AbtXmlSimpleHttpProcessor w/content type application/soap+xm

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

AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby gkipe » Thu May 07, 2009 2:34 pm

I am working with a 3rd party Web Service and using the class AbtXmlSimpleHttpProcessor to invoke my SOAP/XML calls. I have a working input string that was captured with a Soap tool from running some sample Java code thru the Web Service. So I basically just plugged the string into my abtXmlString, using 'POST' and using content type of application/soap+xml. I have used other Web Services using content type text/xml with no problem. Does the class AbtXmlSimpleHttpProcessor support the content type application/soap+xml? The call doesn't walkback, but receives a result of <SOAP-ENV:Text xml:lang="en">No port for method GetObjectsRequest:http://www.filenet.com/ns/fnce/2006/11/ws/schema;
with SOAPAction "" found</SOAP-ENV:Text>

Here is the SOAP capture string, which I am passing to the Web Service ( starting with <soap:Envelope )
==== INPUT ==== http://banjo.cgiams.com:8080/wsi/FNCEWS40MTOM/ ==== 5/6/09 11:24 AM
Content-Length: 1304
Connection: Keep-Alive
Content-Type: multipart/related; type="application/xop+xml"; boundary=--MIMEBoundary633772058855533521; start="<0.633772058855533521@example.org>"; start-info="application/soap+xml; charset=utf-8"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3082)
Host: banjo:8080
VsDebuggerCausalityData: uIDPo2Wkrmt03+9JkhtKQHkcVjkBAAAAZZ7U3sF880uwgS9Rgg948/O+HWf5NMNKr0QMHnkdoXUACQAA

==== FIRST PART ================================================================
Content-Length: 1304
Connection: Keep-Alive
Content-Type: multipart/related; type="application/xop+xml"; boundary=--MIMEBoundary633772058855533521; start="<0.633772058855533521@example.org>"; start-info="application/soap+xml; charset=utf-8"
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 2.0.50727.3082)
Host: banjo:8080
VsDebuggerCausalityData: uIDPo2Wkrmt03+9JkhtKQHkcVjkBAAAAZZ7U3sF880uwgS9Rgg948/O+HWf5NMNKr0QMHnkdoXUACQAA

<soap:Envelope xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><soap:Header><Localization xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema"><Locale>en-US</Locale><Timezone>-04:00</Timezone></Localization><wsse:Security env:mustUnderstand="true" xmlns:env="http://www.w3.org/2003/05/soap-envelope"><wsse:UsernameToken><wsse:Username>TESTUSER1</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">TESTPASSWORD1</wsse:Password></wsse:UsernameToken></wsse:Security></soap:Header>

<soap:Body>
<GetObjectsRequest xmlns="http://www.filenet.com/ns/fnce/2006/11/ws/schema">
<ObjectRequest id="1">
<SourceSpecification classId="Domain" objectId="DevDomain" />
</ObjectRequest>
</GetObjectsRequest>
</soap:Body>
</soap:Envelope>


Thanks, for any help or guidance.
-Garet
gkipe
 
Posts: 24
Joined: Tue Feb 03, 2009 11:05 am

Re: AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby tc » Thu May 07, 2009 9:08 pm

Hello,

I'm confused by your message, you use the words 'web service', which brings a wsdl file to mind but then you say SOAP/xml calls.

Are you talking about a web service that has a wsdl file or a different mechanism?

Thanks.

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

Re: AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby gkipe » Fri May 08, 2009 5:04 am

Web service that has a wsdl file. Sorry for the confusion
gkipe
 
Posts: 24
Joined: Tue Feb 03, 2009 11:05 am

Re: AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby tc » Fri May 08, 2009 6:56 am

Hello,

The examples directory has a lot of examples on how to call a web service by creating and deploying a container. When doing it that way, everything is handled for you, you only create the container and call one of the available functions specified in the WSDL.

Here is code that calls a public web service to do currency conversion:
Code: Select all
[

      | aContainer aServiceCollection contName parm |
      
        contName := SciSocketManager default getHostName.
        aContainer := SstWSContainer containerNamed: contName
            ifNone: [ SstWSContainer createContainerNamed: contName ].
        aServiceCollection := aContainer deploy: 'http://www.webservicex.com/CurrencyConvertor.asmx?wsdl'.
        parm := ( aContainer serializationManager elementNamed: 'ConversionRate'
            inNamespace: 'http://www.webserviceX.NET/' ) asMappedElement.
        parm FromCurrency: 'USD'; ToCurrency: 'GBP'.
        ( ( aServiceCollection first  ) invoke: 'ConversionRate' withArguments: ( Array with: parm ) ) abtXmlPrintString inspect

] fork

. . . please note, if you run the above, sometimes these web services are down and/or may take a few minutes to respond. You will need to know what style the wsdl uses, rpc, doc, or doc/literal wrapped, the functions available, and what params are required for each function.

Thanks.

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

Re: AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby gkipe » Fri May 08, 2009 7:59 am

tc,

I am using VAST 5.5.2, without the SST / Server Workbench functionality, we never purchased this product, and there is no way to buy this feature ( per John O'Keefe ). Management is not going to allow an upgrade either.

Therefore I am basically building a String and using AbtXmlSimpleHttpProcessor to handle the calls. I have been using this methodology for 3 years in making calls to the 3rd party Actuate Reporting WSDL ( using content type text/xml ). I also have this methodology working with the 3rd party FileNet Process Engine WSDL also using content type of text/xml.

I am unable to make this work with the FileNet Content Engine WSDL, which is using content type application/soap+xml, and I'm passing a String which works when passed thru Java. Is there something special with this content type? Do I need to set an attribute in AbtXmlSimpleHttpProcessor?
gkipe
 
Posts: 24
Joined: Tue Feb 03, 2009 11:05 am

Re: AbtXmlSimpleHttpProcessor w/content type application/soap+xm

Postby tc » Fri May 08, 2009 9:28 am

Hello,

Thanks for the clarification but I do not have experience doing that. However, the port type of a wsdl file specifies what operations are supported. If you are getting a 'no port for method' error then my feeling is you are making a call that is not supported by the web service, or the call is correct but the params are not.

--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