VAST Web service call with header info in SOAP request

VA Smalltalk is a "100% VisualAge compatible" IDE that includes the original VisualAge technology and the popular VA Assist and WidgetKit add-ons.

Moderators: Eric Clayberg, wembley, tc, Diane Engles, solveig

VAST Web service call with header info in SOAP request

Postby mmahesh_k » Wed Nov 14, 2007 10:38 am

I have deployed a wsdl to connect to internal web server and got the
service object. See below the wsdl...

<wsdl:operation name="MinimalStabilityTest">
<soapbind:operation soapAction="MinimalStabilityTest" style="document"/>
<wsdl:input>
<soapbind:body parts="MinimalStabilityTestRequest" use="literal"/>
<soapbind:header message="rutschblockinterface:MinimalStabilityTestRequestMessage" part="RequestHeader" use="literal"/>
</wsdl:input>

The method 'MinimalStabilityTest' accepts one
parameter as input with one header, that means outgoing SOAP request
will have one header info in the header section and one parameter in the
body section. When i deployed this wsdl, smalltalk
recognized the header as parameter and created method
(MinimalStabilityTest: with:) with two parameters. This way the outgoing
SOAP request will have header info in the body section but as per wsdl the outgoing SOAP request should have one header info
in the header section and one parameter in the body section.

Now my question is why smalltalk web service framework takes the header
message as parameter and create method with additional input for header?

Also how do i pass header info in the SOAP request? Someone please help me in this regard.

Thanks,
Mahesh
mmahesh_k
 
Posts: 9
Joined: Wed Nov 14, 2007 10:11 am

Postby mmahesh_k » Wed Nov 14, 2007 12:33 pm

When i invoked method MinimalStabilityTest: with: i got the below error message..

'The type an AbtXmlQName(requestheader:RequestHeader) for WSDL part ''RequestHeader'' could not be determined'.

I debugged the code and found the typeObject of servicepart is nil, the method typeObjectForPart: check for the typeObject, if the typeObject is nil the above error will be popped up. Can someone help me to know what i should do when i have a header info to be passed in the SOAP request?

Thanks,
Mahesh
mmahesh_k
 
Posts: 9
Joined: Wed Nov 14, 2007 10:11 am

Postby tc » Fri Nov 16, 2007 9:21 am

Hello,

The WSDL you posted confuses me a little bit, however, does the service work? For example, the site:

http://www.soapclient.com/soaptest.html

. . . will let you run the service and you can look at the wsdl and soap message source.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Postby mmahesh_k » Fri Nov 16, 2007 10:49 am

Yes it is a valid service.

I think am missing something in the code for complex type, the schema for the RequestHeader has three attributes in it.. so i guess i need to do xmlmapping for complex type, but i dont how to do it.. If you have any idea please throw some lights on it..

Thanks,
Mahesh
mmahesh_k
 
Posts: 9
Joined: Wed Nov 14, 2007 10:11 am

Postby tc » Sat Nov 17, 2007 8:02 am

Hello,

Here is a simple example from the XML in a nutshell book:
Code: Select all
<xs:element name="letter">
  <xs:complexType mixed="true">
    <xs:sequence>
      <xs:element name="greeting"/>
      <xs:element name="body"/>
      <xs:element name="closing"/>
    </xs:sequence>
  </xs:complexType>
</xs:element>


The xs:sequence element says those elements have to appear in that order. One can replace xs:sequence with xs:choice meaning one has to appear and xs:all meaning they all have to appear but in any order.
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Postby mmahesh_k » Mon Nov 19, 2007 11:31 am

What shud i do when i get the error message 'The type an AbtXmlQName(requestheader:RequestHeader) for WSDL part ''RequestHeader'' could not be determined'. I got the above error message when creating the payload elements for the SOAP header..
The header info (RequestHeader) is of complex type, anyone please let me know how to pass complex type in the method which will be converted to header elements?
mmahesh_k
 
Posts: 9
Joined: Wed Nov 14, 2007 10:11 am

Postby tc » Mon Nov 19, 2007 2:46 pm

Hello,

It may be you are using implicit soap headers which are newer, can you regenerate the wsdl specifying explicit headers and test that?

Thanks.

--tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC

Postby mmahesh_k » Wed Nov 21, 2007 11:41 am

I am using explicit header, header information is part of the portType.
Can you please tell me why the type object is nil for the header?
mmahesh_k
 
Posts: 9
Joined: Wed Nov 14, 2007 10:11 am

Postby tc » Thu Nov 22, 2007 5:28 am

Hello,

The information is not enough for me to pinpoint the exact issue, however, explicit headers are soap v1.2. The insurance example talks about having to include some explicit xml lines for that. Without those lines, the soap processing is done using soap v1.1.

-tc
tc
Moderator
 
Posts: 304
Joined: Tue Oct 17, 2006 7:40 am
Location: Raleigh, NC


Return to VA Smalltalk 7.0, 7.5 & 8.0

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest