Yes

[EMAIL PROTECTED] wrote:

I only see an update SaajMarshaller - is that it?

-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 20, 2005 4:08 PM
To: [email protected]
Subject: Re: [servicemix-user] Problems invoking a web service with SOAP


I have modified the SaajBinding to handle such cases.
Could you give it a try ?

Cheers,
Guillaume Nodet

[EMAIL PROTECTED] wrote:

Guillaume,

I think that we are almost there, but one slight issue
remains (well, at
least I hope that it is slight). The first piece of XML
below is the output
from our webservice that is invoked via the SaajComponent:
<?xml version="1.0" encoding="UTF-8"?>
<e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:d="http://www.w3.org/2001/XMLSchema";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
xmlns:wn0="http://idoox.com/interface";
xmlns:wn1="http://systinet.com/soap-jta/";
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";>
  <e:Body>
      <wn2:getPersonResponse>
          <wn2:response i:type="wn2:Person">
              <wn2:descriptioni:type="d:string">Desktop customizer
(1135104068804)</wn2:description>
<wn2:firstName
i:type="d:string">Jonathan</wn2:firstName>
<wn2:lastName
i:type="d:string">Edwards</wn2:lastName>
          </wn2:response>
      </wn2:getPersonResponse>
  </e:Body>
</e:Envelope>

The above output is only slightly different from the XML
returned from the
HttpSoapConnector that is being used (the sequence is SoapClient ->
HttpSoapConnector -> SaajComponent -> SoapService, and back,
using InOut
MEP):

<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <soap:Body>
      <wn2:getPersonResponse
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";>
          <wn2:response
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
i:type="wn2:Person">
              <wn2:description
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
i:type="d:string">Desktop customizer
(1135102658677)</wn2:description>
              <wn2:firstName
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
i:type="d:string">Jonathan</wn2:firstName>
              <wn2:lastName
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
i:type="d:string">Edwards</wn2:lastName>
          </wn2:response>
      </wn2:getPersonResponse>
  </soap:Body>
</soap:Envelope>

Most of the namespace information is preserved, except for
one critical
element: the 'xmlns:d="http://www.w3.org/2001/XMLSchema";'
namespace, present
in the first XML output is missing from the second one. This
omission causes
problems for the SOAP stack that we are using when it
attempts to resolve
the "d:string" values. I am not sure if the shortcoming is in the
HttpSoapConnector or the SaajComponent.

thanks for your help!

/jonathan



-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 20, 2005 12:57 AM
To: [email protected]
Subject: Re: [servicemix-user] Problems invoking a web service with SOAP


This should now be fixed on svn head in apache incubator.
If you do not want to update your whole source tree, you can just
grab the SaajMarshaler at http://svn.apache.org/viewcvs.cgi/incubator/servicemix/trunk/s
ervicemix-components/src/main/java/org/servicemix/components/s
aaj/SaajMarshaler.java?rev=357934&view=markup

Guillaume

[EMAIL PROTECTED] wrote:

Guillaume,

Using the HttpSoapConnector (from v1055 svn.codehaus.org) to
communicate
with a different web service, I now get the following
response (Execution
is: SoapClient -> HttpSoapConnector -> SaajComponent ->
WebService):
<?xml version='1.0' encoding='UTF-8'?>
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 <soap:Body>
<e:Envelope
xmlns:e="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:d="http://www.w3.org/2001/XMLSchema";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
xmlns:wn0="http://idoox.com/interface";
xmlns:wn1="http://systinet.com/soap-jta/";
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";>
         <e:Body>
             <wn2:getPersonResponse
xmlns:wn2="http://systinet.com/wsdl/com/cexp/ws/test/";>
                 <wn2:response i:type="wn2:Person">
                     <wn2:description i:type="d:string">Desktop
customizer</wn2:description>
                     <wn2:firstName
i:type="d:string">Jonathan</wn2:firstName><wn2:lastName
i:type="d:string">Edwards</wn2:lastName>
                 </wn2:response>
             </wn2:getPersonResponse>
         </e:Body>
     </e:Envelope>
 </soap:Body>
</soap:Envelope>

As you can see, the output from the SaajComponent is being
re-wrapped by the
HttpSoapConnector in another SoapEnvelope. Is this the
expected behavior?
/jonathan



-----Original Message-----
From: Guillaume Nodet [mailto:[EMAIL PROTECTED]
Sent: Monday, December 19, 2005 1:34 PM
To: [email protected]
Subject: Re: [servicemix-user] Problems invoking a web service with SOAP


You should try using the HttpSoapConnector instead of the HttpConnector + XSLT transformer. The HttpSoapConnector uses a DOM representation to extract the element in the Body tag, so
there should be no parsing errors.

Cheers,
Guillaume Nodet

[EMAIL PROTECTED] wrote:

Help!

I have run in to a slight problem with an exchange that I
have set up within
ServiceMix. The set up is as follows:

Soap Client -> HttpConnector -> ChainedComponent -> (XSLT to
remove SOAP
body -> SaajComponent -> SOAP Web Service)

This operation is synchronous, and works on simple XML where
there are no
complex namespaces in the XML. Ths following request,
however, does not
function as expected:

<?xml version="1.0" encoding="UTF-8"?>.
<e:Envelope xmlns:e="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:d="http://www.w3.org/2001/XMLSchema";
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
xmlns:wn0="http://systinet.com/xsd/SchemaTypes/";
xmlns:wn1="http://systinet.com/wsdl/com/cexp/coe/bob/ws/c
ustomer/"
xmlns:wn2="http://systinet.com/soap-jta/";
xmlns:wn3="http://systinet.com/wsdl/com/cexp/coe/bob/services
/order/pojo/">
<e:Body>
<wn1:getCustomerInfo>
  <wn1:userId i:type="d:string">akayali</wn1:userId>
</wn1:getCustomerInfo>
</e:Body>
</e:Envelope>

As you can see, there is an implicit namespace reference
within the "i:type"
field, that is "string" has the namespace "d" associated
with it. The simple
XSLT body extraction does not capture any of the namespace
information, as
it is located within the Envelope declaration. The Saaj
components tries to
deal with this, and does a noble job, that results in this XML:

<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";>
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<wn1:getCustomerInfo
xmlns:wn1="http://systinet.com/wsdl/com/cexp/coe/bob/ws/cus
tomer/">.
<wn1:userId
xmlns:i="http://www.w3.org/2001/XMLSchema-instance";
i:type="d:string">akayali</wn1:userId>.
</wn1:getCustomerInfo>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> As you can see, the Saaj component determines that the
namespace "i" must be
declared, but because "d" is implied only within the value
for the type
field, the Saaj component does not declare it (I assume that
it does not
introspect the value fields at all). Because "d" is not
present in the SOAP
request that is passed to the SOAP web service, the
service throws an
exception while trying to deserialize/parse.

I thought that I could work around this, and utilize the
HttpSoapConnector
and HttpSoapInvoker components, but I fear that these will
suffer from the
same issues. Moreover, I don't think that the
HttpSoapInvoker is setting up
the Http header information correctly for a Soap service
invocation (there
is no SoapAction specified at all, and the content-type is
text/html),
resulting in a 400 response. Is this the expected behavior of
HttpSoapInvoker?

I am thinking about writing a custom XSL to extract the
namespaces from the
incoming message and place them in the first node of the
body, but I am not
sure if this is feasible with XSL (that is, can you access
the namespace in
XSL and treat it like any other attribute?).

Any help is welcome, including other components within
ServiceMix that might
work.

regards,
/jonathan










Reply via email to