[JBossWS] - Problem Accessing Web Service
by djayakaran
Hi,
I deployed a very simple web service to JBoss-4.2.0.GA, and used JBoss's wsconsume utility to generates stubs. I ran the client in its own JVM as a java application. It invokes the web service... no problem!
Then I coded a servlet (actually an Action class much like Struts) to call the web service. In this case the servlet and the web service are deployed within the same EAR. When the servlet invokes the web service from within the same container I get an exception when it tries to get the port. The offending line of code is in the generated service class:
return (CurrencyWS)super.getPort(new QName("http://currencyconverter.ws/", "CurrencyWSPort"), CurrencyWS.class);
The exception says:
javax.xml.ws.WebServiceException: SEI is missing @WebService annotation: interface ws.currencyconverter.CurrencyWS
All my annotations seem to be fine... the web service deploys fine and a client running in a separate JVM invokes it successfully.
If I run the web service on one machine and the servlet (web server) on another machine they communicate just fine.
Can someone tell me what I'm doing wrong?
Thanks,
David
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055801#4055801
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055801
17 years, 7 months
[JBossWS] - Endpoint does not contain operation meta data for: getAccoun
by Maffewl
I want to try and test the backwards compatibility of a webservice I upgraded from Axis to JBossWS.
Up to this point I have consumed the old wsdl w/ wsconsume and have the service deployed in Jboss 4.2.0.GA. I sent in the old xml and it hits the endpoint but i get the following message:
[org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://xxxxx/account}accountServicePort does not contain operation meta data for: getAccount
here is the request I am sending that works in our old environment (axis/jboss.net) but fails in the new environment:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://xxxxx/account">
| <SOAP-ENV:Body>
| <getAccount>
| ...
| </getAccount>
| </SOAP-ENV:Body>
| </SOAP-ENV:Envelope>
just for kicks I changed the getAccount tags to :
<m0:getAccount> ... </m0:getAccount>
as defined in the envelope, and i got a different error
[org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
org.jboss.ws.WSException: Cannot find child element: {http://xxxxx/type}getAccount
which seems to me that it it does find the 'getAccount'.
but the reality is, i cant really change the request. I have to try and upgrade transparently.
heres a portion of the deployed wsdl on the service if it helps
<definitions name='AccountService' targetNamespace='http://xxxxx/account' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://xxx/type' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://xxxxx/account' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
| <types>
| <xs:schema elementFormDefault='qualified' targetNamespace='http://xxxxx/type' version='1.0' xmlns:tns='http://xxxxx/type' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
|
| ...
|
| <xs:element name='getAccount'>
| <xs:complexType>
| <xs:sequence>
|
| ...
|
| </xs:sequence>
| </xs:complexType>
| </xs:element>
| </xs:schema>
| </types>
|
| ...
|
| <message name='accountService_getAccount'>
| <part element='ns1:getAccount' name='getAccount'></part>
| </message>
|
| ...
|
| <portType name='accountService'>
|
| ...
|
| <operation name='getAccount' parameterOrder='getAccount'>
| <input message='tns:accountService_getAccount'></input>
| <output message='tns:accountService_getAccountResponse'></output>
| </operation>
|
| ...
|
| </portType>
|
| <binding name='accountServiceBinding' type='tns:accountService'>
| <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
|
| ...
|
| <operation name='getAccount'>
| <soap:operation soapAction='urn:#GetAccount'/>
| <input>
| <soap:body use='literal'/>
| </input>
| <output>
| <soap:body use='literal'/>
| </output>
| </operation>
|
| ...
|
| </binding>
| <service name='accountService'>
| <port binding='tns:accountServiceBinding' name='accountServicePort'>
| <soap:address location='http://xxxxxxxx:8080/accountService'/>
| </port>
| </service>
| </definitions>
|
thanks
matt
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055800#4055800
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055800
17 years, 7 months
[JBossWS] - "ArrayOf" parameter types generating BindingExceptions
by acxjbertr
I am using a "Top Down" (aka wsdl-to-java) approach to create a JSR109 endpoint with JBossWS 1.2.1.GA.
The WSDL that was provided to me contains things like:
| <s:complexType name="FieldSelection">
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="FieldName" type="s:string" />
| <s:element minOccurs="0" maxOccurs="1" name="Values" type="tns:ArrayOfString" />
| </s:sequence>
| </s:complexType>
| <s:complexType name="ArrayOfString">
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="unbounded" name="string" nillable="true" type="s:string" />
| </s:sequence>
| </s:complexType>
|
My wstools-config.xml is:
| <?xml version="1.0" encoding="UTF-8"?>
| <configuration xmlns="http://www.jboss.org/jbossws-tools">
| <wsdl-java location="services.wsdl" parameter-style="bare">
| <mapping file="mapping.xml" />
| </wsdl-java>
| </configuration>
|
Running the wstools Ant task finishes without a problem. Both the code and mapping document are generated without error.
However, when I deploy the service and try to invoke it I get a BindingException saying that the ArrayOfString class cannot be found. Upon inspection of the generated classes there isn't a ArrayOfString.java file nor any references to a ArrayOfString object in FieldSelection.java. FieldSelection uses the actual array type "String[]".
When I look at the mapping.xml I see this:
| <java-xml-type-mapping>
| <java-type>ArrayOfString</java-type>
| <root-type-qname xmlns:typeNS='http://www.domain.com/projname/services'>typeNS:ArrayOfString</root-type-qname>
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| <java-variable-name>string</java-variable-name>
| <xml-element-name>string</xml-element-name>
| </variable-mapping>
| </java-xml-type-mapping>
|
When I remove this snippet from the mapping.xml everything works fine.
Is this appropriate behavior?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055761#4055761
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055761
17 years, 7 months
[JBossWS] - Cannot obtain java type mapping for
by poyge394
can anybody give me a guideline pleass
client code:
| URL url = new URL("http://api.tradera.com/v1/publicservice.asmx?WSDL");
| QName qname = new QName("http://api.tradera.com", "PublicService");
|
| ServiceFactory factory = ServiceFactory.newInstance();
| Service service = factory.createService(url, qname);
|
| PublicServiceSoap pss = (PublicServiceSoap) service.getPort(new QName("http://api.tradera.com", "PublicServiceSoap"), PublicServiceSoap.class);
|
Exception:
| WARN getSOAPAddress, Unprocessed extension element: {http://schemas.xmlsoap.org/wsdl/http/}address
| WARN processBinding, Unsupported binding: {http://schemas.xmlsoap.org/wsdl/http/}binding
| WARN getSOAPAddress, Unprocessed extension element: {http://schemas.xmlsoap.org/wsdl/http/}address
| WARN processBinding, Unsupported binding: {http://schemas.xmlsoap.org/wsdl/http/}binding
| WARN processBinding, Unsupported binding: {http://schemas.xmlsoap.org/wsdl/http/}binding
| WARN processBinding, Unsupported binding: {http://schemas.xmlsoap.org/wsdl/http/}binding
| WARN getBindingByInterfaceName, Multiple WSDL bindings referrence the same interface: {http://api.tradera.com}PublicServiceSoap
| WARN getBindingByInterfaceName, Multiple WSDL bindings referrence the same interface: {http://api.tradera.com}PublicServiceSoap
| WARN getBindingByInterfaceName, Multiple WSDL bindings referrence the same interface: {http://api.tradera.com}PublicServiceSoap
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://api.tradera.com}>GetItem
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processDocElement(JAXRPCMetaDataBuilder.java:627)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at se.sj.ipl.tradera.AddItemXmlWebService.testTraderaPublicApiStatic(AddItemXmlWebService.java:58)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
| at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
| at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
| at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
| at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
| at org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
| at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
| at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
| at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
|
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055516#4055516
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055516
17 years, 7 months