L.S.,
There's no real problem with your configuration and even if there was,
the endpoint should never go into and endless XML parsing loop. Could
you open a JIRA issue for this problem? It would be awesome if you
could provide us with a little SA to demonstrate the issue.
Regards,
Gert
KOS wrote:
Hi
I'm trying to build a simple web service bridge using <http:soap-consumer>
and <http:soap-provider>. See below for xbean.xml files.
I also refer to my earlier post:
http://www.nabble.com/NullPointerException-servicemix-http-2008.1---stax-tt21232836.html
(third message).
The problem:
When I send a request, there's no response (soapUI gets time out, I guess
from the http-soap-consumer). It's not a matter of the external web service.
The external web service never gets the request from the http-soap-provider.
As far as I have seen, it's the http-soap-provider that blocks, i.e. it does
never leave the while()-loop in the copy() method of
org.apache.servicemix.soap.util.stax.StaxUtil, but I don't know the reason,
neither how to fix it.
Runtime info: The reader.hasNext() method seems to return always true (so it
doesn't leave the while-loop), and the 'event' field always has the value 8,
which corresponds to XMLStreamConstants.END_DOCUMENT. Maybe the problem is
in the FragmentStreamReader, of which type the reader is in my case.
It might be a bug, or I misconfigured the SUs.
This is the SOAP-request I send:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:agen="http://qname">
<soapenv:Header/>
<soapenv:Body>
<agen:informationRequest>
<agen:companyName></agen:companyName>
<agen:information></agen:information>
</agen:informationRequest>
</soapenv:Body>
</soapenv:Envelope>
Another issue concerning the implementation of the copy-method of StaxUtil:
According to this document:
http://www.ibm.com/developerworks/xml/library/x-stax1.html , section
"Processing XML documents", reader.hasNext() returns false as soon as it is
in the END_DOCUMENT state, i.e. reader.next() returns
XMLStreamConstants.END_DOCUMENT. As copy() first calls reader.next() and
then checks for reader.hasNext(), the switch-clause is never processed in
the END_DOCUMENT state. In the example in the mentioned document,
reader.hasNext() is called before transferring to the next element/state, so
the switch-clause is processed once more. I don't know if this is
volitional, or if it is a bug.
Thanks for help.
The xbean.xml files:
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:agen="qname"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<http:soap-provider service="agen:Agency"
endpoint="AgencyHttpSoap11Endpoint"
wsdl="http://wsserver/Agency?wsdl"
validateWsdl="false"
useJbiWrapper="false"
/>
</beans>
-------
<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:agen="qname"
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://servicemix.apache.org/http/1.0
http://servicemix.apache.org/schema/servicemix-http-3.2.2.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<http:soap-consumer service="agen:AgencyProxy"
endpoint="AgencyHttpSoap11Endpoint"
targetService="agen:Agency"
targetEndpoint="AgencyHttpSoap11Endpoint"
locationURI="http://0.0.0.0:8192/AgencyProxy"
wsdl="mymain.wsdl"
useJbiWrapper="false"
/>
</beans>