[JBoss Web Services Users] - JBossWS Client vs. SoapUI
by jasonstratton
One of our teams has a service that has been deployed and I can successfully test it with SoapUI. This is a service that was originally on a Matamatrix server and is now deployed on JBoss. Both the new JBoss service and the legacy Metamatrix services are available and can be tested successfully with SoapUI. The WSDL have not changed, just the endpoint location.
Another team has written a client of the original Metamatrix service, which works fine. They changed the endpoint to point to the new service on JBoss and they get a "Server Error".
I have hopped in to try to resolve the issue. Used wsconsume to generate the client stubs and a small command line app to drive things. I generated it using the WSDL of the service deployed on JBoss and I get the same "Server Error". I just change the BindingProvider.ENDPOINT_ADDRESS_PROPERTY to point t the legacy Metamatrix service and it works fine. So I believe my code should work with either service.
I have checked the log on the server when the error occurs and I find the error message:
"SAAJ0511: Unable to create envelope from given source"
Next I used TCPTrace to capture the successful request from SoapUI and the unsuccessful request from my code and I found the following:
Successful Request from SoapUI:
POST /idataservice-rs-pa/ia HTTP/1.0
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "IAList_WebService.IAList.getIAList"
User-Agent: Jakarta Commons-HttpClient/3.1
Content-Length: 340
Authorization: Basic czYwOTE1NzpKYVo3VnU5dQ==
Host: localhost:8080
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ial="http://IAListRequest.xsd">
<soapenv:Header/>
<soapenv:Body>
<ial:IAListRequest>
<ial:Tin_Txt>174991806</ial:Tin_Txt>
<ial:Plan_ID>1749918060205</ial:Plan_ID>
</ial:IAListRequest>
</soapenv:Body>
</soapenv:Envelope>
Unsuccessful Request:
POST /idataservice-rs-pa/ia HTTP/1.1
Authorization: Basic czYwOTE1NzpKYVo3VnU5dQ==
SOAPAction: "IAList_WebService.IAList.getIAList"
Content-Type: text/xml; charset=UTF-8
JBoss-Remoting-Version: 22
User-Agent: JBossRemoting - 2.2.3
Host: localhost:8080
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
Transfer-Encoding: chunked
123
<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><IAListRequest xmlns="http://IAListRequest.xsd" xmlns:ns2="http://IAListResponse.xsd"><Tin_Txt>174991806</Tin_Txt><Plan_ID>1749918060205</Plan_ID></env:Body></env:Envelope>
0
Please note the text/numbers before and after the tags. I'm guessing that these are causing the "SAAJ0511: Unable to create envelope from given source" error.
I'm not sure where this text/numbers are coming from.
Can anyone please give me a clue?
Thank you very much
Jason
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264671#4264671
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264671
15 years, 1 month
javax.xml.ws.WebServiceException:
by Rubavathi
Hi,
I am facing the following issue while invoking a web service method,
Exception in thread "main" javax.xml.ws.WebServiceException:
java.lang.IllegalStateException: Cannot find property:
javax.xml.ws.handler.message.outbound | at
org.jboss.ws.core.jaxws.client.ClientImpl.handleRemoteException(ClientImpl.java:410)
Please give me a solution to solve this problem
Regards,
Rubavathi
15 years, 1 month
[JBoss Web Services Users] - Question about SOAPMessage
by oechevarria
Hi all,
I installed and ran the test suite for jbossws-native-3.2.0.GA. Everything worked OK. Then using Eclipse I ran and debugged the tests in the org.jboss.test.ws.jaxws.samples.provider package. Everything OK again.
Then I modified ProviderBeanMessage.java to look like this (just the modified part):
public SOAPMessage invoke(SOAPMessage request)
{
SOAPPart soapPart = request.getSOAPPart();
try {
SOAPEnvelope envelope =soapPart.getEnvelope();
SOAPBody body = envelope.getBody();
SOAPHeader header = envelope.getHeader();
Source source = soapPart.getContent();
} catch (SOAPException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return request;
}
I also modified ProviderMessageTestCase.java to enhance the test String to look like this
private String msgString =
"<soap:Envelope xmlns:soap='http://schemas.xmlsoap.org/soap/envelope/'>" +
" <soap:Body>" +
" <ns1:somePayload xmlns:ns1='http://org.jboss.ws/provider'/>" +
"<ns1:addcall xmlns:ns1='http://org.jboss.ws/provider'>" +
"<ns1:addImport xmlns:ns1='http://org.jboss.ws/provider'>" +
"<ns1:ImportCalcCalculator xmlns:ns1='http://org.jboss.ws/provider'>" +
"<ns1:Num2 xmlns:ns1='http://org.jboss.ws/provider'>?</ns1:Num2>" +
"<ns1:Num1 xmlns:ns1='http://org.jboss.ws/provider'>?</ns1:Num1>" +
"</ns1:ImportCalcCalculator>" +
"</ns1:addImport>" +
"</ns1:addcall>" +
" </soap:Body>" +
"</soap:Envelope>";
I rebuilt and ran everything again and when I looked at the contents of the incoming request in the Bean I noticed that element ns1:addImport and its children are not visible or present in the message structure. So the line Source source = soapPart.getContent();
returns an invalid object.
If I inspect the response back in testProviderDispatch() and testProviderMessage() (in ProviderMessageTestCase.java) the entire message is there.
So the question is: why is that when the message arrives on the server side it is missing a portion of its contents?
Any thoughts or comments are greatly appreciated
Regards,
Octavio
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4264389#4264389
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4264389
15 years, 1 month
[JBoss Web Services Users] - Re: Problem of polymorphism of JBoss WebService
by xiangyingbing
18:05:26,151 INFO [STDOUT] ------------ArrayList<Animal> is got:
| 18:05:26,151 INFO [STDOUT] One Animal is got:Animal-->name:Animal.1,age:1
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from
| stateless bean context, it should already have been injected
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from
| stateless bean context, it should already have been injected
| 18:05:26,151 INFO [STDOUT] ------------ArrayList<Animal> is got:
| 18:05:26,151 INFO [STDOUT] One Animal is got:Animal-->name:Human.1,age:1
| ~~~~~~~~~~~I had expected here print
| [18:05:26,151 INFO [STDOUT] One Human is got:Animal-->name:Human.1,age:1]
|
|
|
| ------------returnedValue2:
| *** item:Animal-->name:Human.1,age:1
| *** item:Animal-->name:Human.2,age:2
| ~~~~~~~~Here i had expected print something like:
| *** item:Human-->name:Human.1,age:1, email:xxxx
|
|
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263904#4263904
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263904
15 years, 1 month
[JBoss Web Services Users] - Re: Problem of polymorphism of JBoss WebService
by xiangyingbing
============== result from JBoss AS==============
| 18:05:01,199 DEBUG [ManagerBase] Start expire sessions StandardManager at 1257329101199 sessioncount 0
| 18:05:01,199 DEBUG [ManagerBase] End expire sessions StandardManager processingTime 0 expired sessions: 0
| 18:05:07,230 FINE [tcp] RMI Scheduler(0): close connection
| 18:05:07,230 FINE [tcp] RMI TCP Connection(9)-127.0.0.1: (port 1558) connection closed
| 18:05:07,230 FINE [tcp] RMI TCP Connection(9)-127.0.0.1: close connection
| 18:05:26,120 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,120 INFO [STDOUT] ------------String is got:Test string
| 18:05:26,120 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,136 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,136 INFO [STDOUT] ------------Animal is got:Animal-->name:Animal.1,age:1
| 18:05:26,136 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,136 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,136 INFO [STDOUT] ------------Animal is got:Animal-->name:Human.1,age:1
| 18:05:26,136 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 INFO [STDOUT] ------------Human is got, name:Human.1, email:human1@gmail.com
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 INFO [STDOUT] ------------ArrayList<Animal> is got:
| 18:05:26,151 INFO [STDOUT] One Animal is got:Animal-->name:Animal.1,age:1
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,151 INFO [STDOUT] ------------ArrayList<Animal> is got:
| 18:05:26,151 INFO [STDOUT] One Animal is got:Animal-->name:Human.1,age:1
| 18:05:26,151 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 18:05:26,167 WARN [StatelessBeanContext] EJBTHREE-1337: do not get WebServiceContext property from stateless bean context, it should already have been injected
| 1
|
============== result from client ==============
| Nov 4, 2009 6:05:25 PM com.sun.xml.internal.ws.model.RuntimeModeler getResponseWrapperClass
| INFO: Dynamically creating response wrapper bean Class com.ybxiang.ejbws.jaxws.ReturnSomething1Response
| ===================testing===========================
| test:ejbWebServiceBean.passParameter1("Test string");
| test:ejbWebServiceBean.passParameter2(a1);
| test:ejbWebServiceBean.passParameter2(h);
| test:ejbWebServiceBean.passParameter3(h);
| test:ejbWebServiceBean.passParameter4(aa);
| test:ejbWebServiceBean.passParameter4(hh);
| ---------------[animal]------------------
| ------------returnedValue1:
| *** item:Animal-->name:Animal.1,age:1
| *** item:Animal-->name:Animal.2,age:2
| ---------------[human]------------------
| ------------returnedValue2:
| *** item:Animal-->name:Human.1,age:1
| *** item:Animal-->name:Human.2,age:2
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263903#4263903
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263903
15 years, 1 month