Core Web Services
Core Web Services
- Subject: Core Web Services
- From: Fred McCann <email@hidden>
- Date: Fri, 11 Mar 2005 20:03:48 -0500
I'm trying to build an application that uses core web services to talk
to a web service implemented with Apache Axis. I have control over both
sides of this communication so I can make changes as needed on either
side. (I've already discovered that Core Web Services has problems with
type long). I used WSMakeStubs to create Objective-C code to use my
service.
The service I'm working with right now is a simple task that transmits
a complex object called Widget. I can get the application to call the
service and even get a successful response, the problem is in the
parsing. The type is defined as:
<complexType name="Widget">
<sequence>
<element name="code" nillable="true" type="soapenc:string"/>
<element name="color" nillable="true" type="soapenc:string"/>
<element name="count" type="xsd:int"/>
<element name="date" nillable="true" type="xsd:dateTime"/>
<element name="description" nillable="true" type="soapenc:string"/>
<element name="name" nillable="true" type="soapenc:string"/>
<element name="serial" nillable="true" type="soapenc:int"/>
</sequence>
</complexType>
When the application makes a response for a specific Widget, it gets
this:
HTTP/1.1 200 OK
Content-Type: text/xml;charset=utf-8
Date: Fri, 11 Mar 2005 23:59:16 GMT
Server: Apache-Coyote/1.1
Connection: close
<soapenv:envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:body>
<ns1:loadresponse
soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://service.wstest.codesmarts.net">
<loadreturn href="#id0" />
</ns1:loadresponse>
<multiref id="id0" soapenc:root="0"
soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="ns2:Widget"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns2="urn:wstest">
<code xsi:type="soapenc:string">
WI2314</code>
<color xsi:type="soapenc:string">
blue
</color>
<count href="#id1" />
<date xsi:type="xsd:dateTime">
2004-12-12T05:00:00.000Z
</date>
<description xsi:type="soapenc:string">
Foo barr
</description>
<name xsi:type="soapenc:string">
Tape Recorder
</name>
<serial href="#id2" />
</multiref>
<multiref id="id2" soapenc:root="0"
soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="soapenc:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
56
</multiref>
<multiref id="id1" soapenc:root="0"
soapenv:encodingstyle="http://schemas.xmlsoap.org/soap/encoding/"
xsi:type="xsd:int"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
12
</multiref>
</soapenv:body>
</soapenv:envelope>
The NSDictionary that I get from this call has every field set properly
except for serial and count- the two integer fields. Does anyone have
any insight or suggestions? I've got a lot of experience with Java and
writing web services with Apache Axis. Generally I have few problems
working other languages and SOAP implementations (I've had few problems
with Java, .Net, and Flash clients), so I'm wondering if this is a
problem in Core Web Services or if perhaps I'm just doing something
wrong?
-- Fred McCann
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden