• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Complex data for webservices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Complex data for webservices


  • Subject: Re: Complex data for webservices
  • From: Niklas Saers <email@hidden>
  • Date: Fri, 25 Apr 2008 09:22:39 +0200

Hi Jeff,
thanks for writing http://iphonedevelopment.blogspot.com/2008/04/web-services-fun_18.html It is a very good writeup of many of the things we've discussed. :-)


What's very relevant to our discussion is the fact that you don't mention having to delete half of the generated code. I've ran
WSMakeStubs -x ObjC -name WeatherService -url http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
on my system and sure enough, it creates only a single set of interfaces with corresponding implementations, instead of two that are generated when I do the same with my service:
WSMakeStubs -x ObjC -name DummyStubs -url http://78.157.102.46:2234/DummyWS/Service1.asmx?WSDL
(if you do a quick "grep interface DummyStubs.*|sort" after having generated them, it will be obvious they are double up)



Another interesting thing is that you mention using NSData, so based on your example I created the equivalent for my service with different kinds of input parameters:


id testStr = [myService testString:[[NSData alloc] init]];
NSLog(@"Found data 1: %@", testStr);
testStr = [myService testString:@""];
NSLog(@"Found data 2: %@", testStr);
testStr = [myService testString:[[NSObject alloc] init]];
NSLog(@"Found data 3: %@", testStr);
testStr = [myService testString:[[NSDictionary alloc] init]];
NSLog(@"Found data 4: %@", testStr);

Again, I get nil as an answer:

Found data 1: (null)
Found data 2: (null)
Found data 3: (null)
Found data 4: (null)

Again the fault is:
System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: SOAPAction.
at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest()
at System .Web .Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message)
at System.Web.Services.Protocols.SoapServerProtocol.Initialize()
at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean&amp; abortProcessing)


And as we discussed, the following is set in the header: Soapaction: SOAPAction


A final thing I wondered about was "In many cases, complex objects expect an NSDictionary with the xml tag name used as the key and the tag's contents as the corresponding object". What do you mean by that? Do you have a code example you could clarify it with?


Thanks again

	Nik
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Complex data for webservices (From: Niklas Saers <email@hidden>)
 >Re: Complex data for webservices (From: Niklas Saers <email@hidden>)
 >Re: Complex data for webservices (From: Niklas Saers <email@hidden>)
 >Re: Complex data for webservices (From: Jeff LaMarche <email@hidden>)
 >Re: Complex data for webservices (From: Niklas Saers <email@hidden>)
 >Re: Complex data for webservices (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: One pixel width. One.
  • Next by Date: Re: One pixel width. One.
  • Previous by thread: Re: Complex data for webservices
  • Next by thread: How is this possible?
  • Index(es):
    • Date
    • Thread