Help writing a soap request for a web service with xsd complextype


E

Etantonio

Hi,
I've a web service that requires in input an object of type
AcquireMessageInput so defined

<xs:complexType name="AcquireMessageInput">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="messageData"
type="bdi:MessageStructure">
</xs:element>
</xs:sequence>
</xs:complexType>

where

<xs:complexType name="MessageStructure">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="fragment"
type="bdi:FragmentStructure">
</xs:element>
</xs:sequence>
<xs:attribute name="communityID" type="xs:string" use="required"/>
</xs:complexType>

and it use FragmentStructure


<xs:attribute name="fragmentDigest" type="xs:string" use="required"/>
</xs:complexType>


the problem is that RAD and its web service explorer doesn't produce a
soap request that also include FragmentStructure so I'm trying to
writing it by hand but I've no idea, this is my latest test and
doesn't work

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:q0="http://www.bankitalia.it/feed/webfarm/common/vo"
xmlns:q1="http://bankitalia.it/nrd/feed/FEEDDelivery"
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>
<q1:messageDelivery>
<acquireMessageInput>
<q0:messageData
channelID="0001"
<q0:fragment
originalfilename="didi"
/>
/>
</acquireMessageInput>
</q1:messageDelivery>
</soapenv:Body>
</soapenv:Envelope>


Any idea about how to write this soap request to my web service ?

Antonio
www.etantonio.it/en
 
Ad

Advertisements

M

Mike Amling

Etantonio said:
...
<xs:complexType name="FragmentStructure">
<xs:attribute name="fragmentUniqueID" type="xs:string" use="required"/
<xs:attribute name="fragmentDigest" type="xs:string" use="required"/>
</xs:complexType>


the problem is that RAD and its web service explorer doesn't produce a
soap request that also include FragmentStructure so I'm trying to
writing it by hand but I've no idea, this is my latest test and
doesn't work

What -does- happen when it doesn't work? Error message?
<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:q0="http://www.bankitalia.it/feed/webfarm/common/vo"
xmlns:q1="http://bankitalia.it/nrd/feed/FEEDDelivery"
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>
<q1:messageDelivery>
<acquireMessageInput>
<q0:messageData
channelID="0001"
<q0:fragment
originalfilename="didi"
/>
/>
</acquireMessageInput>
</q1:messageDelivery>
</soapenv:Body>
</soapenv:Envelope>


Any idea about how to write this soap request to my web service ?

1. Shouldn't the q0:fragment tag have the two required attributes
fragmentUniqueID= and fragmentDigest=?
2. Is your question "how to write" about opening an http connection,
sending headers and sending tags? Or about how to construct the tags
before they're sent?

--Mike Amling
 
Ad

Advertisements

E

Etantonio

Yes, objects are more complex but I just write here the minimum (..
with some errors)
now I attach the revised objects :

<xs:complexType name="AcquireMessageInput">
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="messageData"
type="bdi:MessageStructure">
</xs:element>
</xs:sequence>
</xs:complexType>

<xs:complexType name="MessageStructure">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="fragment"
type="bdi:FragmentStructure">
</xs:element>
</xs:sequence>
<xs:attribute name="channelID" type="xs:string" use="required"/>
</xs:complexType>


<xs:complexType name="FragmentStructure">
<xs:attribute name="fragmentUniqueID" type="xs:string"
use="required"/
<xs:attribute name="fragmentDigest" type="xs:string" use="required"/</xs:complexType>


the following soap request work correctly :

<?xml version="1.0" encoding="UTF-8" ?>
<soapenv:Envelope
xmlns:q0="http://www.bankitalia.it/feed/webfarm/common/vo"
xmlns:q1="http://bankitalia.it/nrd/feed/FEEDDelivery"
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>
<q1:messageDelivery>
<acquireMessageInput>
<q0:messageData
channelID="0001"
/>
</acquireMessageInput>
</q1:messageDelivery>
</soapenv:Body>
</soapenv:Envelope>

but I want to define also a fragment object to test my web service,
how I can define it ?

Thanks

Antonio
www.etantonio.it
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top