Discussions
Categories
- 197K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.8K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 556 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.4K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 205 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 468 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
JAXWS Metro-JAXB error Expecting payload with {...}Opwebmethod1

Hi
I deploy my java maven webservice applications in Tomcat 7.0.57 64bit , jdk 1.8.0_66 using dependencies:
<dependency><!-- forl webcontext annotation injection-->
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-tools</artifactId>
<version>2.2.10</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
for generated resources and wsdl i use
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxws-maven-plugin</artifactId>
<version>1.10</version>
<executions>
<execution>
<id>generate-wsdl</id>
<phase>generate-resources</phase>
</execution>
</executions>
<configuration>
<genWsdl>true</genWsdl>
<sei>it.xxxxx.fatcaWs.FatcaWSSIF</sei>
</configuration>
</plugin>
when i deploy it, i get endpoint wsdl normally via http link : http://localhost:8080/contextpath/url-pattern(sun-jaxb-xml)?wsdl
When i make a call using a jaxws client, i get soap fault exception:
Exception in thread "main" com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: No payload. Expecting payload with {http://fatcaWs.xxxxx.it/}Opwebmethod1 element Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:116)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy32.opwebmethod1(Unknown Source)
Why?
The webmethod has got a Boolean parameter and return an Object class of type Data. Data have the right requirements of Jaxb class (costructors without parameters and with parameters,set and get method, right annotation on property result ecc..)
This is my network sniffing using tcpmon utility:
GET /fatcaWs/FatcaWSSIF?wsdl HTTP/1.1
User-Agent: Java/1.8.0_25
Host: localhost
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
POST /fatcaWs/FatcaWSSIF HTTP/1.1
Accept: text/xml, multipart/related
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://fatcaWs.xxxx.it/FatcaWSSIF/Opwebmethod1Request"
User-Agent: JAX-WS RI 2.2.9-b130926.1035 svn-revision#5f6196f2b90e9460065a4c2f4e30e065b245e51e
Host: localhost
Connection: keep-alive
Content-Length: 211
<?xml version="1.0" ?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><ns2:Opwebmethod1 xmlns:ns2="http://fatcaWs.xxxx.it/"><ns2:ok>true</ns2:ok></ns2:Opwebmethod1>
</S:Body></S:Envelope>
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 18 Dec 2015 21:49:28 GMT
7ec
<?xml version='1.0' encoding='UTF-8'?>
<!-- Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b. -->
<!-- Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.10 svn-revision#919b322c92f13ad085a933e8dd6dd35d4947364b. -->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://www.w3.org/ns/ws-policy"
xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://fatcaWs.xxxx.it/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://fatcaWs.xxxx.it/" name="FatcaWSSIFService">
<types>
<xsd:schema>
<xsd:import namespace="http://fatcaWs.xxxx.it/" schemaLocation="http://localhost:80/fatcaWs/FatcaWSSIF?xsd=1"/>
</xsd:schema>
</types>
<message name="Opwebmethod1">
<part name="parameters" element="tns:Opwebmethod1"/>
</message>
<message name="Opwebmethod1Response">
<part name="parameters" element="tns:Opwebmethod1Response"/>
</message>
<portType name="FatcaWSSIF">
<operation name="Opwebmethod1">
<input wsam:Action="http://fatcaWs.xxxx.it/FatcaWSSIF/Opwebmethod1Request" message="tns:Opwebmethod1"/>
<output wsam:Action="http://fatcaWs.xxxx.it/FatcaWSSIF/Opwebmethod1Response" message="tns:Opwebmethod1Response"/>
</operation>
</portType>
<binding name="FatcaWSSIFPortBinding" type="tns:FatcaWSSIF">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="Opwebmethod1">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="FatcaWSSIFService">
<port name="FatcaWSSIFPort" binding="tns:FatcaWSSIFPortBinding">
<soap:address location="http://localhost:80/fatcaWs/FatcaWSSIF"/>
</port>
</service>
</definitions>
0
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Transfer-Encoding: chunked
Date: Fri, 18 Dec 2015 21:49:28 GMT
Connection: close
6e
<?xml version='1.0' encoding='UTF-8'?><S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"><S:Body>
e8
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope"><faultcode>S:Server</faultcode><faultstring>No payload. Expecting payload with {http://fatcaWs.xxxx.it/}Opwebmethod1 element</faultstring></S:Fault></S:Body></S:Envelope>
0