Problems with JAX-WS with EJB (No such operation: null) - java

First: my english is not good
My setup: JBoss AS 7
my WebService
#WebService
#Stateless
#Local(PessoaFisicaInterfaceWS.class)
public class PessoaFisicaWS implements PessoaFisicaInterfaceWS {
#PersistenceContext
public EntityManager manager;
#Override
#WebMethod
public List<PessoaFisica> getList() {
return manager.createQuery("SELECT p FROM PessoaFisica p")
.getResultList();
}
}
my wsdl:
<wsdl:definitions name="PessoaFisicaWSService"
targetNamespace="http://pacote/">
<wsdl:types>
<xs:schema elementFormDefault="unqualified" targetNamespace="http://pacote/"
version="1.0">
<xs:element name="getList" type="tns:getList" />
<xs:element name="getListResponse" type="tns:getListResponse" />
<xs:element name="pessoaFisica" type="tns:pessoaFisica" />
<xs:complexType name="getList">
<xs:sequence />
</xs:complexType>
<xs:complexType name="getListResponse">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="return"
type="tns:pessoaFisica" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="pessoaFisica">
<xs:complexContent>
<xs:extension base="tns:pessoa">
<xs:sequence>
<xs:element minOccurs="0" name="cpf" type="xs:string" />
<xs:element minOccurs="0" name="dataRegistroGeral"
type="xs:dateTime" />
<xs:element minOccurs="0" name="escolaridade" type="tns:escolaridade" />
<xs:element minOccurs="0" name="estadoCivil" type="tns:estadoCivil" />
<xs:element minOccurs="0" name="estadoRg" type="tns:estado" />
<xs:element minOccurs="0" name="generoSexual" type="tns:sexo" />
<xs:element minOccurs="0" name="nomeConjuge" type="xs:string" />
<xs:element minOccurs="0" name="nomeMae" type="xs:string" />
<xs:element minOccurs="0" name="nomePai" type="xs:string" />
<xs:element minOccurs="0" name="numeroRegistroGeral"
type="xs:string" />
<xs:element minOccurs="0" name="profissao" type="tns:profissao" />
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType abstract="true" name="pessoa">
<xs:sequence>
<xs:element minOccurs="0" name="bairro" type="xs:string" />
<xs:element minOccurs="0" name="celular1" type="xs:string" />
<xs:element minOccurs="0" name="celular2" type="xs:string" />
<xs:element minOccurs="0" name="cep" type="xs:string" />
<xs:element minOccurs="0" name="cidadeEndereco" type="tns:cidade" />
<xs:element minOccurs="0" name="cidadeNascimento" type="tns:cidade" />
<xs:element minOccurs="0" name="dataNascimento" type="xs:dateTime" />
<xs:element minOccurs="0" name="email" type="xs:string" />
<xs:element minOccurs="0" name="endereco" type="xs:string" />
<xs:element minOccurs="0" name="nome" type="xs:string" />
<xs:element minOccurs="0" name="observacao" type="xs:string" />
<xs:element minOccurs="0" name="telefone1" type="xs:string" />
<xs:element minOccurs="0" name="telefone2" type="xs:string" />
<xs:element minOccurs="0" name="tipoPessoa" type="tns:tipoPessoa" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="escolaridade">
<xs:sequence />
</xs:complexType>
<xs:complexType name="estadoCivil">
<xs:sequence />
</xs:complexType>
<xs:complexType name="estado">
<xs:sequence>
<xs:element minOccurs="0" name="nomeEstado" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sexo">
<xs:sequence />
</xs:complexType>
<xs:complexType name="profissao">
<xs:sequence />
</xs:complexType>
<xs:complexType name="cidade">
<xs:sequence>
<xs:element minOccurs="0" name="descricao" type="xs:string" />
<xs:element minOccurs="0" name="estado" type="tns:estado" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="tipoPessoa">
<xs:sequence />
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getListResponse">
<wsdl:part element="tns:getListResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getList">
<wsdl:part element="tns:getList" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="PessoaFisicaWS">
<wsdl:operation name="getList">
<wsdl:input message="tns:getList" name="getList">
</wsdl:input>
<wsdl:output message="tns:getListResponse" name="getListResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PessoaFisicaWSServiceSoapBinding"
type="tns:PessoaFisicaWS">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getList">
<soap:operation soapAction="" style="document" />
<wsdl:input name="getList">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="getListResponse">
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PessoaFisicaWSService">
<wsdl:port binding="tns:PessoaFisicaWSServiceSoapBinding"
name="PessoaFisicaWSPort">
<soap:address location="http://localhost:8080/ProcessosModulos/PessoaFisicaWS" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
but in my browser: localhost:8080/ProcessosModulos/PessoaFisicaWS?getList
<soap:Envelope>
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>No such operation: null (HTTP GET PATH_INFO:
/ProcessosModulos/PessoaFisicaWSnull)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>
My web service doesnot find my method getList, any idea why?
thank you

Related

Unable to call SOAP service using apache call method

Following code for calling SOAP webservice
String serviceURL="http://cbswebpr.ptcl.net.pk/QueryBillInfoServices?wsdl";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress(new URL(serviceURL));
call.setPortTypeName(new QName("http://ocs.ztesoft.com/xsd","QueryBillInfoServices"));
call.setOperationName(new QName("http://ocs.ztesoft.com/xsd", "queryBillInfo"));
call.setUsername("abc");
call.setPassword("1234");
call.addParameter("computerId", org.apache.axis.Constants.SOAP_STRING,ParameterMode.IN);
call.addParameter("number", org.apache.axis.Constants.SOAP_STRING ,ParameterMode.IN);
call.addParameter("packetType",org.apache.axis.Constants.SOAP_STRING ,ParameterMode.IN);
String computerId="192.168.1.1";
String number="0931231313";
String packetType="R9";
String returnValue = (String) call.invoke(new Object[] {computerId,number,packetType});
Getting following error
xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body><soapenv:Fault><faultcode xmlns:nsIDc08="http://schemas.xmlsoap.org/soap/envelope/">nsIDc08:Client</faultcode><faultstring>Fail to find service because request URI is not start with service path [/services/].</faultstring></soapenv:Fault></soapenv:Body></soapenv:Envelope>
{http://xml.apache.org/axis/}HttpErrorCode:400
WSDL
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://ocs.ztesoft.com/xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="QueryBillInfoServices" targetNamespace="http://ocs.ztesoft.com/xsd">
<wsdl:types>
<xs:schema xmlns:tns="http://ocs.ztesoft.com/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://ocs.ztesoft.com/xsd">
<xs:element name="queryBillInfo" type="tns:queryBillInfo"/>
<xs:element name="queryBillInfoResponse" type="tns:queryBillInfoResponse"/>
<xs:complexType name="queryBillInfo">
<xs:sequence>
<xs:element minOccurs="0" name="QueryBillInfoReq" type="tns:queryBillInfoReq"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="queryBillInfoReq">
<xs:sequence>
<xs:element minOccurs="0" name="addCode" type="xs:string"/>
<xs:element minOccurs="0" name="bankCode" type="xs:string"/>
<xs:element minOccurs="0" name="beginNum" type="xs:string"/>
<xs:element minOccurs="0" name="computerId" type="xs:string"/>
<xs:element minOccurs="0" name="contactNumber" type="xs:string"/>
<xs:element minOccurs="0" name="endNum" type="xs:string"/>
<xs:element minOccurs="0" name="esnNumber" type="xs:string"/>
<xs:element minOccurs="0" name="invoiceNbr" type="xs:string"/>
<xs:element minOccurs="0" name="invoiceTag" type="xs:string"/>
<xs:element minOccurs="0" name="locationId" type="xs:string"/>
<xs:element minOccurs="0" name="mdn" type="xs:string"/>
<xs:element minOccurs="0" name="number" type="xs:string"/>
<xs:element minOccurs="0" name="packetType" type="xs:string"/>
<xs:element minOccurs="0" name="queryType" type="xs:string"/>
<xs:element minOccurs="0" name="transNumber" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="header">
<xs:sequence>
<xs:element minOccurs="0" name="passWord" type="xs:string"/>
<xs:element minOccurs="0" name="userName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="queryBillInfoResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:queryBillInfoResp"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="queryBillInfoResp">
<xs:sequence>
<xs:element minOccurs="0" name="accNbr" type="xs:string"/>
<xs:element minOccurs="0" name="acctId" type="xs:string"/>
<xs:element minOccurs="0" name="address" type="xs:string"/>
<xs:element minOccurs="0" name="areaCode" type="xs:string"/>
<xs:element minOccurs="0" name="balance" type="xs:string"/>
<xs:element minOccurs="0" name="billNbr" type="xs:string"/>
<xs:element minOccurs="0" name="billState" type="xs:string"/>
<xs:element minOccurs="0" name="chargingTime" type="xs:string"/>
<xs:element minOccurs="0" name="custId" type="xs:string"/>
<xs:element minOccurs="0" name="customerName" type="xs:string"/>
<xs:element minOccurs="0" name="dueDate" type="xs:string"/>
<xs:element minOccurs="0" name="esn" type="xs:string"/>
<xs:element minOccurs="0" name="installationDate" type="xs:string"/>
<xs:element minOccurs="0" name="invoiceNbr" type="xs:string"/>
<xs:element minOccurs="0" name="latnId" type="xs:string"/>
<xs:element minOccurs="0" name="mdn" type="xs:string"/>
<xs:element minOccurs="0" name="mdnLocked" type="xs:string"/>
<xs:element minOccurs="0" name="mdnLockedCode" type="xs:string"/>
<xs:element minOccurs="0" name="mdnState" type="xs:string"/>
<xs:element minOccurs="0" name="mdnStateCode" type="xs:string"/>
<xs:element minOccurs="0" name="mdnSubscriberType" type="xs:string"/>
<xs:element minOccurs="0" name="mobile" type="xs:string"/>
<xs:element minOccurs="0" name="mobileNo" type="xs:string"/>
<xs:element minOccurs="0" name="payAfterDueDate" type="xs:string"/>
<xs:element minOccurs="0" name="payByDueDate" type="xs:string"/>
<xs:element minOccurs="0" name="resultCode" type="xs:string"/>
<xs:element minOccurs="0" name="resultMsg" type="xs:string"/>
<xs:element minOccurs="0" name="transNumber" type="xs:string"/>
<xs:element minOccurs="0" name="validForPayment" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="AuthHeader" nillable="true" type="tns:header"/>
</xs:schema>
</wsdl:types>
<wsdl:message name="queryBillInfoResponse">
<wsdl:part name="parameters" element="tns:queryBillInfoResponse"> </wsdl:part>
</wsdl:message>
<wsdl:message name="queryBillInfo">
<wsdl:part name="parameters" element="tns:queryBillInfo"> </wsdl:part>
<wsdl:part name="AuthHeader" element="tns:AuthHeader"> </wsdl:part>
</wsdl:message>
<wsdl:portType name="QueryBillInfoServices">
<wsdl:operation name="queryBillInfo">
<wsdl:input name="queryBillInfo" message="tns:queryBillInfo"> </wsdl:input>
<wsdl:output name="queryBillInfoResponse" message="tns:queryBillInfoResponse"> </wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="QueryBillInfoServicesSoapBinding" type="tns:QueryBillInfoServices">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="queryBillInfo">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="queryBillInfo">
<soap:header message="tns:queryBillInfo" part="AuthHeader" use="literal"> </soap:header>
<soap:body parts="parameters" use="literal"/>
</wsdl:input>
<wsdl:output name="queryBillInfoResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="QueryBillInfoServices">
<wsdl:port name="QueryBillInfoServicesPort" binding="tns:QueryBillInfoServicesSoapBinding">
<soap:address location="http://cbswebpr.ptcl.net.pk:8180/services/QueryBillInfoServices/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

javax.xml.bind.UnmarshalException while fetching a SOAP response

I'm getting below error while fetching a response from SOAP service from a java client:
[javax.xml.bind.UnmarshalException: unexpected element (uri:"http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema", local:"AddressInfoResponse"). Expected elements are (none)]
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.handleStreamException(UnmarshallerImpl.java:447)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(UnmarshallerImpl.java:372)
at com.sun.xml.internal.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:342)
But I was able to successfully connect to the service from Eclipse but when deployed the jar to my webshere server i am getting this error.
There are no service end, it was able to successfully send the below response:
<?xml version="1.0" encoding="UTF-8"?>
<ns0:AddressInfoOut xmlns:ns0="http://www.carefirst.com/Enterprise/DAC/DACStatusService">
<Output>
<ns1:AddressInfoResponse xmlns:ns1="http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema">
<ns1:Success>true</ns1:Success>
<ns1:docProp>
<ns1:Property PropertyName="BTCH_ID">222EOB222</ns1:Property>
<ns1:Property PropertyName="outbound address line1">103 North Washington Street</ns1:Property>
<ns1:Property PropertyName="outbound address city">Suitland</ns1:Property>
<ns1:Property PropertyName="mail forwarding address line1">103 N WASHINGTON ST</ns1:Property>
<ns1:Property PropertyName="mail forwarding address city">BRYANS ROAD</ns1:Property>
<ns1:Property PropertyName="fiserv status">mailed</ns1:Property>
</ns1:docProp>
</ns1:AddressInfoResponse>
</Output>
</ns0:AddressInfoOut>
WSDL
<?xml version="1.0" encoding="UTF-8"?>
<!--Created by TIBCO WSDL-->
<wsdl:definitions xmlns:ns2="http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema" xmlns:ns1="http://carefirst.com/Enterprise/Operations/SoapFault" xmlns:tns="http://www.carefirst.com/Enterprise/DAC/DACStatusService" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://www.carefirst.com/Enterprise/DAC/StatusRetrievalSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" name="Untitled" targetNamespace="http://www.carefirst.com/Enterprise/DAC/DACStatusService">
<wsdl:types>
<xs:schema xmlns="http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xs:element name="AddressInfoRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns2:header" minOccurs="0"/>
<xs:element ref="ns2:body"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AddressInfoResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns2:Success"/>
<xs:element ref="ns2:docProp"/>
<xs:element ref="ns2:Error" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BatchID" type="xs:string"/>
<xs:element name="Error">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns2:msgCode" minOccurs="0"/>
<xs:element ref="ns2:msg" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Success" type="xs:boolean"/>
<xs:element name="TransactionID" type="xs:string"/>
<xs:element name="body">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns2:BatchID"/>
<xs:element ref="ns2:TransactionID"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="docProp">
<xs:complexType>
<xs:sequence>
<xs:element name="Property" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="PropertyName" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="header" type="xs:string"/>
<xs:element name="msg" type="xs:string"/>
<xs:element name="msgCode" type="xs:string"/>
</xs:schema>
<xsd:schema xmlns="http://carefirst.com/Enterprise/Operations/SoapFault" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://carefirst.com/Enterprise/Operations/SoapFault" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:element name="fault">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="faultType" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SystemUnavailableFault" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SourceSystemInvalid" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DataNotFound" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="ApplicationException" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="SystemTimeOutException" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="PackageNotCompiled" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="AuthenticationException" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="InputDataInvalid" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="msg" type="xsd:string" minOccurs="0"/>
<xsd:element name="msgCode" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="DefaultFault" minOccurs="0">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="faultCode" type="xsd:string" minOccurs="0"/>
<xsd:element name="faultMsg" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<xs:schema xmlns="http://www.carefirst.com/Enterprise/DAC/StatusRetrievalSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.carefirst.com/Enterprise/DAC/StatusRetrievalSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xs:element name="BatchID" type="xs:string"/>
<xs:element name="CDWBatchID" type="xs:string"/>
<xs:element name="Error">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns0:msgCode" minOccurs="0"/>
<xs:element ref="ns0:msg" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="StatusRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns0:header" minOccurs="0"/>
<xs:element ref="ns0:body"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="StatusResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns0:Success"/>
<xs:element ref="ns0:docProp"/>
<xs:element ref="ns0:Error" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Success" type="xs:boolean"/>
<xs:element name="TransactionID" type="xs:string"/>
<xs:element name="body">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns0:BatchID" minOccurs="0"/>
<xs:element ref="ns0:CDWBatchID" minOccurs="0"/>
<xs:element ref="ns0:TransactionID" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="docProp">
<xs:complexType>
<xs:sequence>
<xs:element name="Property" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="PropertyName" type="xs:string"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="header">
<xs:complexType>
<xs:sequence>
<xs:element ref="ns0:senderID" minOccurs="0"/>
<xs:element ref="ns0:senderApp" minOccurs="0"/>
<xs:element ref="ns0:msgID" minOccurs="0"/>
<xs:element ref="ns0:msgVersion" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="msg" type="xs:string"/>
<xs:element name="msgCode" type="xs:string"/>
<xs:element name="msgID" type="xs:string"/>
<xs:element name="msgVersion" type="xs:string"/>
<xs:element name="senderApp" type="xs:string"/>
<xs:element name="senderID" type="xs:string"/>
</xs:schema>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.w3.org/XML/1998/namespace" elementFormDefault="unqualified" attributeFormDefault="qualified">
<attribute name="base" type="anyURI"/>
<attribute name="id" type="ID"/>
<attribute name="lang">
<simpleType>
<union memberTypes="language">
<simpleType>
<restriction base="string">
<length value="0"/>
</restriction>
</simpleType>
</union>
</simpleType>
</attribute>
<attribute name="space" default="preserve">
<simpleType>
<restriction base="NCName">
<enumeration value="default"/>
<enumeration value="preserve"/>
</restriction>
</simpleType>
</attribute>
<attributeGroup name="specialAttrs">
<attribute ref="xml:base"/>
<attribute ref="xml:id"/>
<attribute ref="xml:lang"/>
<attribute ref="xml:space" default="preserve"/>
</attributeGroup>
</schema>
</wsdl:types>
<wsdl:service name="DACStatusService">
<wsdl:port name="StatusandAddressRetrievalPortEndpoint1" binding="tns:StatusandAddressRetrievalPortEndpoint1Binding">
<soap:address location="http://localhost:9318/DACStatus_Services/BusinessProcesses/StatusandAddressRetrievalService/DACStatusService.serviceagent/StatusandAddressRetrievalPortEndpoint"/>
</wsdl:port>
</wsdl:service>
<wsdl:portType name="StatusandAddressRetrievalPort">
<wsdl:operation name="StatusRetrieval">
<wsdl:input message="tns:StatusIn"/>
<wsdl:output message="tns:StatusOut"/>
<wsdl:fault name="fault1" message="tns:Fault"/>
</wsdl:operation>
<wsdl:operation name="AddressRetrieval">
<wsdl:input message="tns:AddressInfoIn"/>
<wsdl:output message="tns:AddressInfoOut"/>
<wsdl:fault name="fault1" message="tns:Fault"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="StatusandAddressRetrievalPortEndpoint1Binding" type="tns:StatusandAddressRetrievalPort">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="StatusRetrieval">
<soap:operation style="document" soapAction="/DACStatus_Services/BusinessProcesses/StatusandAddressRetrievalService/DACStatusService.serviceagent/StatusandAddressRetrievalPortEndpoint/StatusRetrieval"/>
<wsdl:input>
<soap:body use="literal" parts="Input"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts="Output"/>
</wsdl:output>
<wsdl:fault name="fault1">
<soap:fault use="literal" name="fault1"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddressRetrieval">
<soap:operation style="document" soapAction="/DACStatus_Services/BusinessProcesses/StatusandAddressRetrievalService/DACStatusService.serviceagent/StatusandAddressRetrievalPortEndpoint/AddressRetrieval"/>
<wsdl:input>
<soap:body use="literal" parts="Input"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal" parts="Output"/>
</wsdl:output>
<wsdl:fault name="fault1">
<soap:fault use="literal" name="fault1"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:message name="StatusIn">
<wsdl:part name="Input" element="ns0:StatusRequest"/>
</wsdl:message>
<wsdl:message name="StatusOut">
<wsdl:part name="Output" element="ns0:StatusResponse"/>
</wsdl:message>
<wsdl:message name="Fault">
<wsdl:part name="Fault" element="ns1:fault"/>
</wsdl:message>
<wsdl:message name="AddressInfoIn">
<wsdl:part name="Input" element="ns2:AddressInfoRequest"/>
</wsdl:message>
<wsdl:message name="AddressInfoOut">
<wsdl:part name="Output" element="ns2:AddressInfoResponse"/>
</wsdl:message>
</wsdl:definitions>
Could anyone please help me this
The namespace of AddressInfoResponse in the shared response is according to WSDL but the unmarshaller is not expecting AddressInfoResponse element to be in namespace http://www.carefirst.com/Enterprise/DAC/AddressRetrievalSchema.
It means the namespace is incorrect or empty in the java object against which the unmarshaller is trying to unmarshal. Please check the namespace against AddressInfoResponse object in your soap client. You need to check package-info class if you have auto generated the objects. In case you have created the client manually using SAAJ then you probably have missed the namespace for this element.

java + Consuming a SOAP web service + "Two classes Have the same XML type name ..."

I'm trying to consume a soap web service with java.
I have classes generated by "wsimport" the following WSDL:
<?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="RepositorioXDS" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" name="adocumentrepository_servicesService" targetNamespace="RepositorioXDS">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns1="RepositorioXDS" targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" version="1.0">
<xs:import namespace="RepositorioXDS"/>
<xs:element name="RegistryErrorList" type="tns:RegistryErrorList"/>
<xs:complexType final="extension restriction" name="RegistryErrorList">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="ns1:RegistryError"/>
</xs:sequence>
<xs:attribute name="highestSeverity" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="RegistryError">
<xs:sequence/>
<xs:attribute name="codeContext" type="xs:string"/>
<xs:attribute name="errorCode" type="xs:string"/>
<xs:attribute name="location" type="xs:string"/>
<xs:attribute name="severity" type="xs:string"/>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns1="RepositorioXDS" targetNamespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" version="1.0">
<xs:import namespace="RepositorioXDS"/>
<xs:complexType final="extension restriction" name="AssociationType1">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Slot" type="tns:SlotType1"/>
</xs:sequence>
<xs:attribute name="associationType" type="xs:string"/>
<xs:attribute name="home" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="lid" type="xs:string"/>
<xs:attribute name="objectType" type="xs:string"/>
<xs:attribute name="sourceObject" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
<xs:attribute name="targetObject" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="SlotType1">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Value" type="xs:string"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"/>
<xs:attribute name="slotType" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="ClassificationType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Name" type="tns:LocalizedStringType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Slot" type="tns:SlotType1"/>
</xs:sequence>
<xs:attribute name="classificationNode" type="xs:string"/>
<xs:attribute name="classificationScheme" type="xs:string"/>
<xs:attribute name="classifiedObject" type="xs:string"/>
<xs:attribute name="home" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="lid" type="xs:string"/>
<xs:attribute name="nodeRepresentation" type="xs:string"/>
<xs:attribute name="objectType" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="LocalizedStringType">
<xs:sequence/>
<xs:attribute name="charset" type="xs:string"/>
<xs:attribute name="lang" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="ExternalIdentifierType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Name" type="tns:LocalizedStringType"/>
</xs:sequence>
<xs:attribute name="home" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="identificationScheme" type="xs:string"/>
<xs:attribute name="lid" type="xs:string"/>
<xs:attribute name="objectType" type="xs:string"/>
<xs:attribute name="registryObject" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
<xs:attribute name="value" type="xs:string"/>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="urn:ihe:iti:xds-b:2007" version="1.0">
<xs:complexType final="extension restriction" name="RetrieveDocumentSetRequestType.DocumentRequest">
<xs:sequence>
<xs:element form="qualified" minOccurs="0" name="DocumentUniqueId" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="HomeCommunityId" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="RepositoryUniqueId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="RetrieveDocumentSetResponseType.DocumentResponse">
<xs:sequence>
<xs:element form="qualified" minOccurs="0" name="Document" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="DocumentUniqueId" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="HomeCommunityId" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="mimeType" type="xs:string"/>
<xs:element form="qualified" minOccurs="0" name="RepositoryUniqueId" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="RepositorioXDS" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns1="urn:ihe:iti:xds-b:2007" elementFormDefault="unqualified" targetNamespace="RepositorioXDS" version="1.0">
<xs:import namespace="urn:ihe:iti:xds-b:2007"/>
<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0"/>
<xs:import namespace="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0"/>
<xs:element name="AssociationType1" type="ns2:AssociationType1"/>
<xs:element name="ClassificationType" type="ns2:ClassificationType"/>
<xs:element name="DocumentType" type="tns:DocumentType"/>
<xs:element name="DocumentsRequest" type="tns:DocumentsRequest"/>
<xs:element name="ExternalIdentifierType" type="ns2:ExternalIdentifierType"/>
<xs:element name="ExtrinsicObjectType" type="tns:ExtrinsicObjectType"/>
<xs:element name="LocalizedStringType" type="ns2:LocalizedStringType"/>
<xs:element name="PING" type="tns:PING"/>
<xs:element name="PINGResponse" type="tns:PINGResponse"/>
<xs:element name="PROVIDEANDREGISTERDOCUMENTSET" type="tns:PROVIDEANDREGISTERDOCUMENTSET"/>
<xs:element name="PROVIDEANDREGISTERDOCUMENTSETResponse" type="tns:PROVIDEANDREGISTERDOCUMENTSETResponse"/>
<xs:element name="RETRIEVEDOCUMENTSET" type="tns:RETRIEVEDOCUMENTSET"/>
<xs:element name="RETRIEVEDOCUMENTSETResponse" type="tns:RETRIEVEDOCUMENTSETResponse"/>
<xs:element name="RegistryError" type="ns3:RegistryError"/>
<xs:element name="RegistryErrorList" type="ns3:RegistryErrorList"/>
<xs:element name="RegistryPackageType" type="tns:RegistryPackageType"/>
<xs:element name="RegistryResponseType" type="tns:RegistryResponseType"/>
<xs:element name="RetrieveDocumentSetRequestType.DocumentRequest" type="ns1:RetrieveDocumentSetRequestType.DocumentRequest"/>
<xs:element name="RetrieveDocumentSetResponseType.DocumentResponse" type="ns1:RetrieveDocumentSetResponseType.DocumentResponse"/>
<xs:element name="SlotType1" type="ns2:SlotType1"/>
<xs:element name="SubmitObjectsRequest" type="tns:SubmitObjectsRequest"/>
<xs:element name="SubmitObjectsRequest.RegistryObjectList" type="tns:SubmitObjectsRequest.RegistryObjectList"/>
<xs:complexType name="RETRIEVEDOCUMENTSET">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Retrievedocumentsetrequest" type="ns1:RetrieveDocumentSetRequestType.DocumentRequest"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="RETRIEVEDOCUMENTSETResponse">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Retrievedocumentsetresponse" type="ns1:RetrieveDocumentSetResponseType.DocumentResponse"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="PROVIDEANDREGISTERDOCUMENTSET">
<xs:sequence>
<xs:element minOccurs="0" name="Submitobjectsrequest" type="tns:SubmitObjectsRequest"/>
<xs:element minOccurs="0" name="Documentsrequest" type="tns:DocumentsRequest"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="SubmitObjectsRequest">
<xs:sequence>
<xs:element minOccurs="0" name="RegistryObjectList" type="tns:SubmitObjectsRequest.RegistryObjectList"/>
</xs:sequence>
<xs:attribute name="comment" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="SubmitObjectsRequest.RegistryObjectList">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Association" type="ns2:AssociationType1"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Classification" type="ns2:ClassificationType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ExtrinsicObject" type="tns:ExtrinsicObjectType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="RegistryPackage" type="tns:RegistryPackageType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="ExtrinsicObjectType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Classification" type="ns2:ClassificationType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Description" type="ns2:LocalizedStringType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ExternalIdentifier" type="ns2:ExternalIdentifierType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Name" type="ns2:LocalizedStringType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Slot" type="ns2:SlotType1"/>
</xs:sequence>
<xs:attribute name="home" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="isOpaque" type="xs:boolean" use="required"/>
<xs:attribute name="lid" type="xs:string"/>
<xs:attribute name="mimeType" type="xs:string"/>
<xs:attribute name="objectType" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="RegistryPackageType">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Classification" type="ns2:ClassificationType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="ExternalIdentifier" type="ns2:ExternalIdentifierType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="LocalizedString" type="ns2:LocalizedStringType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Name" type="ns2:LocalizedStringType"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Slot" type="ns2:SlotType1"/>
</xs:sequence>
<xs:attribute name="home" type="xs:string"/>
<xs:attribute name="id" type="xs:string"/>
<xs:attribute name="lid" type="xs:string"/>
<xs:attribute name="objectType" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="DocumentsRequest">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Document" type="tns:DocumentType"/>
</xs:sequence>
<xs:attribute name="dummy" type="xs:string"/>
</xs:complexType>
<xs:complexType final="extension restriction" name="DocumentType">
<xs:sequence>
<xs:element minOccurs="0" name="data" type="xs:string"/>
</xs:sequence>
<xs:attribute name="id" type="xs:string"/>
</xs:complexType>
<xs:complexType name="PROVIDEANDREGISTERDOCUMENTSETResponse">
<xs:sequence>
<xs:element minOccurs="0" name="Registryresponse" type="tns:RegistryResponseType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType final="extension restriction" name="RegistryResponseType">
<xs:sequence>
<xs:element minOccurs="0" ref="tns:RegistryErrorList"/>
<xs:element maxOccurs="unbounded" minOccurs="0" name="Slot" type="ns2:SlotType1"/>
</xs:sequence>
<xs:attribute name="requestId" type="xs:string"/>
<xs:attribute name="status" type="xs:string"/>
</xs:complexType>
<xs:complexType name="PING">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="PINGResponse">
<xs:sequence>
<xs:element minOccurs="0" name="Pingresult" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="PROVIDEANDREGISTERDOCUMENTSETResponse">
<wsdl:part element="tns:PROVIDEANDREGISTERDOCUMENTSETResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="RETRIEVEDOCUMENTSET">
<wsdl:part element="tns:RETRIEVEDOCUMENTSET" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="RETRIEVEDOCUMENTSETResponse">
<wsdl:part element="tns:RETRIEVEDOCUMENTSETResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="PINGResponse">
<wsdl:part element="tns:PINGResponse" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="PROVIDEANDREGISTERDOCUMENTSET">
<wsdl:part element="tns:PROVIDEANDREGISTERDOCUMENTSET" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:message name="PING">
<wsdl:part element="tns:PING" name="parameters">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="adocumentrepository">
<wsdl:operation name="RETRIEVEDOCUMENTSET">
<wsdl:input message="tns:RETRIEVEDOCUMENTSET" name="RETRIEVEDOCUMENTSET">
</wsdl:input>
<wsdl:output message="tns:RETRIEVEDOCUMENTSETResponse" name="RETRIEVEDOCUMENTSETResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="PROVIDEANDREGISTERDOCUMENTSET">
<wsdl:input message="tns:PROVIDEANDREGISTERDOCUMENTSET" name="PROVIDEANDREGISTERDOCUMENTSET">
</wsdl:input>
<wsdl:output message="tns:PROVIDEANDREGISTERDOCUMENTSETResponse" name="PROVIDEANDREGISTERDOCUMENTSETResponse">
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="PING">
<wsdl:input message="tns:PING" name="PING">
</wsdl:input>
<wsdl:output message="tns:PINGResponse" name="PINGResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="adocumentrepository_servicesServiceSoapBinding" type="tns:adocumentrepository">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="RETRIEVEDOCUMENTSET">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="RETRIEVEDOCUMENTSET">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="RETRIEVEDOCUMENTSETResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="PROVIDEANDREGISTERDOCUMENTSET">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="PROVIDEANDREGISTERDOCUMENTSET">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="PROVIDEANDREGISTERDOCUMENTSETResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="PING">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="PING">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="PINGResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="adocumentrepository_servicesService">
<wsdl:port binding="tns:adocumentrepository_servicesServiceSoapBinding" name="adocumentrepositoryPort">
<soap:address location="http://192.168.1.42:8330/RepositorioXDS/adocumentrepository_services"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
I'm initializing the service as follows:
QName qName = new QName("RepositorioXDS", "adocumentrepository_servicesService");
URL url = new URL("file:///opt/adocumentrepository_services.xml");
AdocumentrepositoryServicesService service = new AdocumentrepositoryServicesService(url, qName);
Adocumentrepository port = service.getAdocumentrepositoryPort();
when making service.getAdocumentrepositoryPort() I am getting the following exepcion:
...
Caused by: java.security.PrivilegedActionException: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 6 counts of IllegalAnnotationExceptions
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}RETRIEVEDOCUMENTSET". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.RETRIEVEDOCUMENTSET
at public simic.soap.generated.repositorio.repositorioxds.RETRIEVEDOCUMENTSET simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createRETRIEVEDOCUMENTSET()
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.RETRIEVEDOCUMENTSET
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}RETRIEVEDOCUMENTSETResponse". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.RETRIEVEDOCUMENTSETResponse
at public simic.soap.generated.repositorio.repositorioxds.RETRIEVEDOCUMENTSETResponse simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createRETRIEVEDOCUMENTSETResponse()
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.RETRIEVEDOCUMENTSETResponse
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}PROVIDEANDREGISTERDOCUMENTSET". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.PROVIDEANDREGISTERDOCUMENTSET
at public simic.soap.generated.repositorio.repositorioxds.PROVIDEANDREGISTERDOCUMENTSET simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createPROVIDEANDREGISTERDOCUMENTSET()
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.PROVIDEANDREGISTERDOCUMENTSET
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}PROVIDEANDREGISTERDOCUMENTSETResponse". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.PROVIDEANDREGISTERDOCUMENTSETResponse
at public javax.xml.bind.JAXBElement simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createPROVIDEANDREGISTERDOCUMENTSETResponse(simic.soap.generated.repositorio.repositorioxds.PROVIDEANDREGISTERDOCUMENTSETResponse)
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.PROVIDEANDREGISTERDOCUMENTSETResponse
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}PING". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.PING
at public javax.xml.bind.JAXBElement simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createPING(simic.soap.generated.repositorio.repositorioxds.PING)
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.PING
Hay dos clases que tienen el mismo nombre de tipo XML "{RepositorioXDS}PINGResponse". Utilice #XmlType.name y #XmlType.namespace para asignarles nombres diferentes.
this problem is related to the following location:
at simic.soap.generated.repositorio.repositorioxds.PINGResponse
at public javax.xml.bind.JAXBElement simic.soap.generated.repositorio.repositorioxds.ObjectFactory.createPINGResponse(simic.soap.generated.repositorio.repositorioxds.PINGResponse)
at simic.soap.generated.repositorio.repositorioxds.ObjectFactory
this problem is related to the following location:
at repositorioxds.PINGResponse
...
I searched #XmlType with the same name in the generated classes, but I have not found. Really I appreciate any advice
Don't fiddle with generated code unless you know what you are doing, and then you won't. Here's what I propose to solve the original problem.
If you can tweak the xjc invocation, option -p would do the trick. (If the wsimport option -p should have the same effect I don't know what went wrong. The argument must be a valid Java package name, not an OS path.)
You might define the namespace to reflect the package name, use simic.soap.generated.repositorio.repositorioxds instead of RepositorioXDS.
Or you can customize the XML Schema by adding a customization statement defining the package name:
Don't forget to add the jaxb namespace prefix definition to <xs:schema>, and the JAXB version.
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0"

Spring ws fault issue in wsdl generation

My service method inside Endpoint class looks like:
#PayloadRoot(namespace=AppExternalServicesConstant.NAMESPACE,localPart="AppPurchaseAddonRequest") #ResponsePayload public AppPurchaseAddonResponse purchaseAddon(#RequestPayload AppPurchaseAddonRequest request) throws ServiceExceptionFault {-- Business logic}
XSD looks like following:
<xs:element name="AppPurchaseAddonRequest" >
<xs:complexType>
<xs:all>
<xs:element name="requestId" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="countryCode" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="addonName" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="number" type="tns:numberType" minOccurs="1" maxOccurs="1"/>
<xs:element name="transactionId" type="tns:transactionIdType" minOccurs="1" maxOccurs="1"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="AppPurchaseAddonResponse" >
<xs:complexType>
<xs:complexContent>
<xs:extension base="tns:Response">
<xs:sequence/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:element>
<xs:complexType name="Request">
<xs:all>
<xs:element name="requestId" type="xs:string" minOccurs="1" maxOccurs="1"/>
</xs:all>
</xs:complexType>
<xs:complexType name="Response">
<xs:sequence>
<xs:element name="responseId" type="xs:string" minOccurs="1" maxOccurs="1"/>
<xs:element name="responseStatus" type="xs:boolean" minOccurs="0" maxOccurs="1"/>
<xs:element minOccurs="0" name="responseDescription" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="ServiceExceptionFault">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" name="faultInfo" type="tns:AppPurchaseAddonFaultInfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="numberType">
<xs:restriction base="xs:string">
<xs:pattern value="[0-9]+"></xs:pattern>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="transactionIdType">
<xs:restriction base="xs:string">
<xs:maxLength value="20"></xs:maxLength>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="AppPurchaseAddonFaultInfo">
<xs:sequence>
<xs:element minOccurs="0" name="exceptionStack" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="errorCode" type="xs:string"/>
<xs:element minOccurs="0" maxOccurs="1" name="errorDescription" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
spring-ws-servlet mapping file:
<wss:annotation-driven/>
<context:component-scan base-package="com.ytlc.app"/>
<context:property-placeholder location="file:${environment.properties.file.path}" system-properties-mode="OVERRIDE" ignore-unresolvable="false"/>
<!-- General properties configuration -->
<!-- Spring Security and Validation configuration -->
<wss:interceptors>
<bean class="com.ytlc.ota.ws.services.spring.interceptors.AppPayloadValidationInterceptor">
<property name="schema" value="/WEB-INF/xsd/appservicesv1.xsd"/>
<property name="validateRequest" value="true"/>
<property name="validateResponse" value="false"/>
</bean>
</wss:interceptors>
<bean class="org.springframework.ws.soap.server.endpoint.SoapFaultAnnotationExceptionResolver" />
<!-- Web Services Orchestrated -->
<wss:dynamic-wsdl id="AppServicesV1" portTypeName="AppServicesV1Port" locationUri="/v1/appws" targetNamespace="http://www.yes.my/appservices">
<wss:xsd location="/WEB-INF/xsd/appservicesv1.xsd"/>
</wss:dynamic-wsdl>
In the generated wsdl, ServiceExceptionFault is generated as operation. Not sure what would be the issue:
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
<wsdl:operation name="ServiceException" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:operation soapAction="" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
<wsdl:fault name="ServiceExceptionFault" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:fault name="ServiceExceptionFault" use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AppPurchaseAddon" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:operation soapAction="" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
<wsdl:input name="AppPurchaseAddonRequest" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
</wsdl:input>
<wsdl:output name="AppPurchaseAddonResponse" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
<soap:body use="literal" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"/>
</wsdl:output>
</wsdl:operation>

SOAP request returned wsdl instead of expected SOAP response

I have a problem with my SOAP request. When I have tried the below soap request to the server then it returns the
expected result.
Location : https://YOUR_SERVER/apitransactional/services/TransactionalService?wsdl
Input:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:api="http://api.service.apitransactional.emailvision.com/">
<soapenv:Header/>
<soapenv:Body>
<api:openApiConnection>
<login>usernaem</login>
<pwd>password</pwd>
<key>security-key</key>
</api:openApiConnection>
</soapenv:Body>
</soapenv:Envelope>
Output:
<soap:Envelope>
<soap:Body>
<ns2:openApiConnectionResponse>
<return>G9X7CsNn3HisxFdwAu4W76mBewQgH9WW-3CyeO9WBMiHXX_u9ufLHDkA-NypiiYFGh7FLbEz2_c1YonjauDs7Jhk9DGvGNSTLMTjdz5wT2V20E4m3axKPzEnjrvzC63ItFzBIYIeYXHxjKf3w9Yxmmhz5SSeXg</return>
</ns2:openApiConnectionResponse>
</soap:Body>
</soap:Envelope>
It returns token of this connection.
But when I tried to the below request then it returns the whole wsdl file instead of
success / fail response.
Location: http://api.notificationmessaging.com/NMSOAP/NotificationService?wsdl
Input:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:api="http://api.service.nsapi.emailvision.com/">
<soapenv:Header/>
<soapenv:Body>
<api:sendObjectsWithFullStatus>
<arg0>
<sendrequest>
<content>
<entry>
<key>1</key>
<value>>
<![CDATA[
<table width="600">
<tr>
<td>
<font size="2" face="Arial">Our powerful algorithms
already found a matching profile that matches your criteria:
<br>Celina72 </font>
<img src="http://mypath/to/my/image.gif" width="50"
height="50" border="0" />
</td>]]></value>
</entry>
</content>
<dyn>
<entry>
<key>firstname</key>
<value>john</value>
</entry>
</dyn>
<email>jblum#flowerpowershop.biz</email>
<encrypt>BdX7CqkmjTHtxWEKB5QK6MzXKkx6HK3E8guM</encrypt>
<notificationId>1234</notificationId>
<random>4A776E3602000078</random>
<senddate>2008-12-12T00:00:00</senddate>
<synchrotype>NOTHING</synchrotype>
<uidkey>EMAIL</uidkey>
</sendrequest>
<sendrequest>
<content>
<entry>
<key>1</key>
<value>>
<![CDATA[
<table width="600">
<tr>
<td>
<font size="2" face="Arial">Our powerful
algorithms already found a matching profile that matches your criteria:
<br>Celina72 </font>
<img src="http://mypath/to/my/image.gif" width-
h="50" height="50" border="0" />
</td>]]></value>
</entry>
</content>
<dyn>
<entry>
<key>firstname</key>
<value>David</value>
</entry>
</dyn>
<email>dcoulon#flowerpowershop.biz</email>
<encrypt>BdX7CqkmjTHtxWEKB5QK6MzXKkx6HK3E8guM</encrypt>
<notificationId>1234</notificationId>
<random>4A776E3602000078</random>
<senddate>2008-12-12T00:00:00</senddate>
<synchrotype>UPDATE</synchrotype>
<uidkey>EMAIL</uidkey>
</sendrequest>
</arg0>
</api:sendObjectsWithFullStatus>
</soapenv:Body>
</soapenv:Envelope>
Output:
<?xml version='1.0' encoding='UTF-8' ?>
<wsdl:definitions name="NotificationServiceService" targetNamespace="http://api.service.nsapi.emailvision.com/">
<wsdl:types>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://api.service.nsapi.emailvision.com/">
<xs:element name="MultiSendRequest" type="tns:multiSendRequest" />
<xs:element name="MultiSendRequestResponse" type="tns:multiSendRequestResponse" />
<xs:element name="getSendRequestById" type="tns:getSendRequestById" />
<xs:element name="getSendRequestByIdResponse" type="tns:getSendRequestByIdResponse" />
<xs:element name="notificationExceptionDetails" type="tns:notificationExceptionDetails" />
<xs:element name="sendObject" type="tns:sendObject" />
<xs:element name="sendObjectResponse" type="tns:sendObjectResponse" />
<xs:element name="sendObjects" type="tns:sendObjects" />
<xs:element name="sendObjectsResponse" type="tns:sendObjectsResponse" />
<xs:element name="sendObjectsWithFullStatus" type="tns:sendObjectsWithFullStatus" />
<xs:element name="sendObjectsWithFullStatusResponse" type="tns:sendObjectsWithFullStatusResponse" />
<xs:element name="sendrequest" type="tns:sendRequest" />
<xs:element name="sendrequestresponse" type="tns:sendRequestResponse" />
<xs:complexType name="sendObjects">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="tns:multiSendRequest" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="multiSendRequest">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="sendrequest" nillable="true" type="tns:sendRequest" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendRequest">
<xs:sequence>
<xs:element name="content">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="key" type="xs:int" />
<xs:element minOccurs="0" name="value" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="dyn">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="entry">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="key" type="xs:string" />
<xs:element minOccurs="0" name="value" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element minOccurs="0" name="email" type="xs:string" />
<xs:element minOccurs="0" name="encrypt" type="xs:string" />
<xs:element name="notificationId" type="xs:long" />
<xs:element minOccurs="0" name="random" type="xs:string" />
<xs:element minOccurs="0" name="senddate" type="xs:dateTime" />
<xs:element minOccurs="0" name="synchrotype" type="tns:synchroType" />
<xs:element minOccurs="0" name="uidkey" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendObjectsResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:multiSendRequestResponse" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="multiSendRequestResponse">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="element" nillable="true" type="tns:notificationServiceResponse" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="notificationServiceResponse">
<xs:sequence>
<xs:element minOccurs="0" name="result" type="xs:anyType" />
</xs:sequence>
<xs:attribute name="email" type="xs:string" />
<xs:attribute name="responseStatus" type="xs:string" />
</xs:complexType>
<xs:complexType name="notificationExceptionDetails">
<xs:sequence>
<xs:element minOccurs="0" name="description" type="xs:string" />
<xs:element maxOccurs="unbounded" minOccurs="0" name="fields" nillable="true" type="xs:string" />
<xs:element minOccurs="0" name="status" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getSendRequestById">
<xs:sequence>
<xs:element name="arg0" type="xs:long" />
<xs:element minOccurs="0" name="arg1" type="xs:string" />
<xs:element minOccurs="0" name="arg2" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getSendRequestByIdResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:sendRequestResponse" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendRequestResponse">
<xs:sequence>
<xs:element minOccurs="0" name="email" type="xs:string" />
<xs:element name="id" type="xs:long" />
<xs:element name="notificationId" type="xs:long" />
<xs:element minOccurs="0" name="processDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="requestDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="sendDate" type="xs:dateTime" />
<xs:element minOccurs="0" name="status" type="xs:string" />
<xs:element minOccurs="0" name="UId" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendObject">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="tns:sendRequest" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendObjectResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:string" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendObjectsWithFullStatus">
<xs:sequence>
<xs:element minOccurs="0" name="arg0" type="tns:multiSendRequest" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="sendObjectsWithFullStatusResponse">
<xs:sequence>
<xs:element minOccurs="0" name="return" type="tns:multiSendRequestResponse" />
</xs:sequence>
</xs:complexType>
<xs:simpleType name="synchroType">
<xs:restriction base="xs:string">
<xs:enumeration value="NOTHING" />
<xs:enumeration value="INSERT" />
<xs:enumeration value="UPDATE" />
<xs:enumeration value="INSERT_UPDATE" />
</xs:restriction>
</xs:simpleType>
</xs:schema>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://exceptions.service.nsapi.emailvision.com/">
<xsd:element name="NotificationServiceException" nillable="true" type="ns0:notificationExceptionDetails" />
</xsd:schema>
</wsdl:types>
<wsdl:message name="getSendRequestByIdResponse">
<wsdl:part element="tns:getSendRequestByIdResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="sendObjectsWithFullStatus">
<wsdl:part element="tns:sendObjectsWithFullStatus" name="parameters" />
</wsdl:message>
<wsdl:message name="NotificationServiceException">
<wsdl:part element="ns1:NotificationServiceException" name="NotificationServiceException" />
</wsdl:message>
<wsdl:message name="sendObjectResponse">
<wsdl:part element="tns:sendObjectResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="sendObjectsResponse">
<wsdl:part element="tns:sendObjectsResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="getSendRequestById">
<wsdl:part element="tns:getSendRequestById" name="parameters" />
</wsdl:message>
<wsdl:message name="sendObjectsWithFullStatusResponse">
<wsdl:part element="tns:sendObjectsWithFullStatusResponse" name="parameters" />
</wsdl:message>
<wsdl:message name="sendObjects">
<wsdl:part element="tns:sendObjects" name="parameters" />
</wsdl:message>
<wsdl:message name="sendObject">
<wsdl:part element="tns:sendObject" name="parameters" />
</wsdl:message>
<wsdl:portType name="NotificationService">
<wsdl:operation name="sendObjects">
<wsdl:input message="tns:sendObjects" name="sendObjects" />
<wsdl:output message="tns:sendObjectsResponse" name="sendObjectsResponse" />
<wsdl:fault message="tns:NotificationServiceException" name="NotificationServiceException" />
</wsdl:operation>
<wsdl:operation name="getSendRequestById">
<wsdl:input message="tns:getSendRequestById" name="getSendRequestById" />
<wsdl:output message="tns:getSendRequestByIdResponse" name="getSendRequestByIdResponse" />
<wsdl:fault message="tns:NotificationServiceException" name="NotificationServiceException" />
</wsdl:operation>
<wsdl:operation name="sendObject">
<wsdl:input message="tns:sendObject" name="sendObject" />
<wsdl:output message="tns:sendObjectResponse" name="sendObjectResponse" />
<wsdl:fault message="tns:NotificationServiceException" name="NotificationServiceException" />
</wsdl:operation>
<wsdl:operation name="sendObjectsWithFullStatus">
<wsdl:input message="tns:sendObjectsWithFullStatus" name="sendObjectsWithFullStatus" />
<wsdl:output message="tns:sendObjectsWithFullStatusResponse" name="sendObjectsWithFullStatusResponse" />
<wsdl:fault message="tns:NotificationServiceException" name="NotificationServiceException" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NotificationServiceServiceSoapBinding" type="tns:NotificationService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="sendObjects">
<soap:operation soapAction="" style="document" />
<wsdl:input name="sendObjects">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="sendObjectsResponse">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="NotificationServiceException">
<soap:fault name="NotificationServiceException" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="getSendRequestById">
<soap:operation soapAction="" style="document" />
<wsdl:input name="getSendRequestById">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="getSendRequestByIdResponse">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="NotificationServiceException">
<soap:fault name="NotificationServiceException" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="sendObject">
<soap:operation soapAction="" style="document" />
<wsdl:input name="sendObject">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="sendObjectResponse">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="NotificationServiceException">
<soap:fault name="NotificationServiceException" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="sendObjectsWithFullStatus">
<soap:operation soapAction="" style="document" />
<wsdl:input name="sendObjectsWithFullStatus">
<soap:body use="literal" />
</wsdl:input>
<wsdl:output name="sendObjectsWithFullStatusResponse">
<soap:body use="literal" />
</wsdl:output>
<wsdl:fault name="NotificationServiceException">
<soap:fault name="NotificationServiceException" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NotificationServiceService">
<wsdl:port binding="tns:NotificationServiceServiceSoapBinding" name="NotificationServicePort">
<soap:address location="http://api.notificationmessaging.com/nsapi/services/NotificationService" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Expected Output:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:sendObjectResponse xmlns:n-
s2="http://api.service.nsapi.emailvision.com/">
<return>SendRequest has been successfully saved!</return>
</ns2:sendObjectResponse>
</soap:Body>
</soap:Envelope>
Can anyone suggest what is the actual problem is?
Does this problem from my request or from the server response?
Is there a specific reason to add ?wsdl to your endpoint address? Response from server(http://api.notificationmessaging.com/NMSOAP/NotificationService) is, not what you expected but definitely not WSLD
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns2:sendObjectsWithFullStatusResponse xmlns:ns2="http://api.service.nsapi.emailvision.com/">
<return>
<element responseStatus="failed" email="jblum#flowerpowershop.biz">
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://www.w3.org/2001/XMLSchema" xsi:type="ns4:string">
Query random: 4A776E3602000078 doesnt match with notification random: {1} !!!
</result>
</element>
<element responseStatus="failed" email="dcoulon#flowerpowershop.biz">
<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns4="http://www.w3.org/2001/XMLSchema" xsi:type="ns4:string">
Query random: 4A776E3602000078 doesnt match with notification random: {1} !!!
</result>
</element>
</return>
</ns2:sendObjectsWithFullStatusResponse>
</soap:Body>
</soap:Envelope>
Can you check that particular operation mplementation at server side. It must have been sending that wsdl in response instead of your desired response. Also you can check your soap action once, may be due to wrong soap action server is filtering your request by sending you a wsdl, Though i am not seeing any soap action in your wsdl.
I have tried this wsdl in soapui, i am getting proper response from it.Though it is unsuccessful.
Query random: 4A776E3602000078 doesnt match with notification random: {1} !!!
Query random: 4A776E3602000078 doesnt match with notification random: {1} !!!

Categories