IBM integration bus: A SOAP request received an HTTP Error Status Code '500' - json

I'm new to Ibm Integration Bus, and I've been struggling to convert Data from http nodes to SOAP nodes.
My message Flow
The problem is when I use SOAP input it works but when I change it with Http input and convert the data from JSON to XML, an error keeps showing up.
code of compute node:
DECLARE reftoOut REFERENCE To OutputRoot.XMLNSC.ns2:MessageExtraitRequest;
DECLARE reftoIn REFERENCE To InputRoot.JSON.Data;
SET reftoOut.ns2:No_du_compte = reftoIn.No_du_compte;
SET reftoOut.ns2:Date_operation = reftoIn.Date_operation;
SET reftoOut.ns2:REFERENCE = reftoIn.REFERENCE;
SET reftoOut.ns2:Libelle = reftoIn.Libelle;
SET reftoOut.ns2:Date_valeur = reftoIn.Date_valeur;
SET reftoOut.ns2:DEBIT = reftoIn.DEBIT;
SET reftoOut.ns2:CREDIT = reftoIn.CREDIT;
my WSDL ( it works just fine with SOAPInput and postman)
<?xml version="1.1" encoding="UTF-8"?> <!-- <definitions> must be the root of the WSDL document --> <wsdl:definitions targetNamespace="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> <!-- WSDL TYPES: definition of the data types that are used in the web service --> <wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
<s:element name="MessageExtraitRequest">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="No_du_compte" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="Date_operation" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="REFERENCE" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="Libelle" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="Date_valeur" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="DEBIT" type="s:int"/>
<s:element minOccurs="1" maxOccurs="1" name="CREDIT" type="s:int"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="MessageExtraitResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="fieldCount" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="affectedRows" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="insertId" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="serverStatus" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="warningCount" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="message" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="protocol41" type="s:string"/>
<s:element minOccurs="1" maxOccurs="1" name="changedRows" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema> </wsdl:types> <!-- MESSAGES: defines the data being exchanged between the service and client --> <wsdl:message name="MessageExtraitSoapIn">
<wsdl:part name="parameters" element="tns:MessageExtraitRequest"/> </wsdl:message> <wsdl:message name="MessageExtraitSoapOut">
<wsdl:part name="parameters" element="tns:MessageExtraitResponse"/> </wsdl:message> <!-- PORT TYPES: defines the complete communication operation (one way/round trip) --> <wsdl:portType name="MessageExtraitSoapPort">
<!-- The operation name must be the same as the one specified in the service object -->
<wsdl:operation name="MessageExtrait">
<wsdl:input message="tns:MessageExtraitSoapIn"/>
<wsdl:output message="tns:MessageExtraitSoapOut"/>
</wsdl:operation> </wsdl:portType> <!-- BINDING: provides details on how a portType operation will actually be transmitted --> <wsdl:binding name="MessageExtraitServiceSoapBinding" type="tns:MessageExtraitSoapPort">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="MessageExtrait">
<soap:operation soapAction="MessageExtrait" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation> </wsdl:binding>
<!-- SERVICE: --> <wsdl:service name="MessageExtraitService">
<wsdl:port name="MessageExtraitServiceSoapPort" binding="tns:MessageExtraitServiceSoapBinding">
<soap:address location="http://localhost:8000/wsdl"/>
</wsdl:port> </wsdl:service> </wsdl:definitions>
The error:
Error sending request to http "http://localhost:7800/server"
java.io.IOException: {"error": {"code":500,"status":"Internal Server Error","detail":"BIP2230E: Error detected whilst processing a message in node 'WS_MF.
SOAP Request'. \nBIP3754E: The SOAP Request Node or SOAP Async Request Node WS_MF.
SOAP Request encountered an error while processing the outbound SOAP request. \nBIP3162S: An HTTP error occurred.
The HTTP Request-Line was: ''POST /wsdl HTTP/1.1
\nBIP3711E: A SOAP request received an HTTP Error Status Code '500', but the response message body was not a SOAP fault.
The HTTP request was made to the destination ''http://localhost:8000/wsdl''.
The HTTP status line that was returned was: ''HTTP/1.1 500 Internal Server Error''. \nBIP3701E: A Java exception was thrown whilst calling the Java JNI method ''Axis2Requester_processResponseMessageSync''.
The Java exception was ''org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: An invalid XML character (Unicode: 0x45) was found in the prolog of the document.''.
The Java stack trace was ''Frame : 0 org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException: An invalid XML character (Unicode: 0x45) was found in the prolog of the document.
| #: org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:293)|
#: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
| #: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
| #: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140)
| #: com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:2259)
| #: com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:1959)
| #: com.ibm.broker.axis2.Axis2Requester.processResponseMessageSync(Axis2Requester.java:2184)|Frame : 1 javax.xml.stream.XMLStreamException: An invalid XML character (Unicode: 0x45) was found in the prolog of the document.
| #: com.ibm.xml.xlxp2.api.stax.msg.StAXMessageProvider.throwWrappedXMLStreamException(StAXMessageProvider.java:76)
| #: com.ibm.xml.xlxp2.api.stax.XMLStreamReaderImpl.produceFatalErrorEvent(XMLStreamReaderImpl.java:2008)
| #: com.ibm.xml.xlxp2.api.jaxb.JAXBXMLStreamReader.produceFatalErrorEvent(JAXBXMLStreamReader.java:356)| #: com.ibm.xml.xlxp2.scan.DocumentScanner.reportFatalError(DocumentScanner.java:4871)| #: com.ibm.xml.xlxp2.scan.DocumentScanner.reportFatalError(DocumentScanner.java:1212)| #: com.ibm.xml.xlxp2.scan.DocumentScanner.scanProlog(DocumentScanner.java:1777)| #: com.ibm.xml.xlxp2.scan.DocumentScanner.nextEvent(DocumentScanner.java:1323)| #: com.ibm.xml.xlxp2.api.stax.XMLStreamReaderImpl.next(XMLStreamReaderImpl.java:581)| #: com.ibm.xml.xlxp2.api.stax.XMLInputFactoryImpl$XMLStreamReaderProxyImpl.next(XMLInputFactoryImpl.java:183)| #: com.ibm.xml.xlxp2.api.wssec.WSSXMLInputFactory$WSSStreamReaderProxy.next(WSSXMLInputFactory.java:55)| #: org.apache.axiom.om.impl.builder.StAXOMBuilder.parserNext(StAXOMBuilder.java:672)| #: org.apache.axiom.om.impl.builder.StAXOMBuilder.next(StAXOMBuilder.java:214)
| #: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.getSOAPEnvelope(StAXSOAPModelBuilder.java:204)
| #: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:154)
| #: org.apache.axiom.soap.impl.builder.StAXSOAPModelBuilder.<init>(StAXSOAPModelBuilder.java:140)
| #: com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:2259)
| #: com.ibm.broker.axis2.SoapUtilities.createSOAPMessage(SoapUtilities.java:1959)
| #: com.ibm.broker.axis2.Axis2Requester.processResponseMessageSync(Axis2Requester.java:2184)''. "}}
at com.ibm.etools.mft.unittest.core.transport.http.HttpClient.makeHttpCall(HttpClient.java:163)
at com.ibm.etools.mft.unittest.core.transport.http.HttpClient.makeSOAPRequest(HttpClient.java:99)
at com.ibm.etools.mft.unittest.core.transport.http.SendHTTPMessageDelegate.sendBytes(SendHTTPMessageDelegate.java:125)
at com.ibm.etools.mft.unittest.core.commchannel.mb.AbstractSendMessageDelegate.sendPlainText(AbstractSendMessageDelegate.java:255)
at com.ibm.etools.mft.unittest.core.commchannel.mb.AbstractSendMessageDelegate.sendMessage(AbstractSendMessageDelegate.java:208)
at com.ibm.etools.mft.unittest.core.transport.http.HTTPHandler.send(HTTPHandler.java:53)
at com.ibm.etools.mft.unittest.core.commchannel.mb.SendMessageOperation.sendMessage(SendMessageOperation.java:87)
at com.ibm.etools.mft.unittest.core.commchannel.jobs.SendMessageOperationJob.doRun(SendMessageOperationJob.java:94)
at com.ibm.etools.mft.unittest.core.commchannel.jobs.SendMessageOperationJob.run(SendMessageOperationJob.java:149)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

The important bits of the error message are:
BIP3754E: The SOAP Request Node or SOAP Async Request Node WS_MF
encountered an error while processing the outbound SOAP request.
BIP3711E: A SOAP request received an HTTP Error Status Code '500',
but the response message body was not a SOAP fault.
In other words: The reply of endpoint http://localhost:8000/wsdl is not valid SOAP reply; maybe it is plain text. You should analyse this endpoint and figure out why it is not replying a proper SOAP reply.

Related

Mail sending through gmail in Mule Flow

I am struggling with mail sending flow in mule, Getting below error:
Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=smtps://dummy.DevGroup:<password>#smtp.gmail.com, connector=SmtpsConnector
I have below configuration in my xml file (Updated with namespace declarations in the Mule XML):
<mule
xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:twilio="http://www.mulesoft.org/schema/mule/twilio"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:stdio="http://www.mulesoft.org/schema/mule/stdio"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
xmlns:file="http://www.mulesoft.org/schema/mule/file"
xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:jms="http://www.mulesoft.org/schema/mule/jms"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xmlns:smtp="http://www.mulesoft.org/schema/mule/smtp"
xmlns:smtps="http://www.mulesoft.org/schema/mule/smtps"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-2.5.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-2.5.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/stdio http://www.mulesoft.org/schema/mule/stdio/current/mule-stdio.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/jms http://www.mulesoft.org/schema/mule/jms/current/mule-jms.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd
http://www.mulesoft.org/schema/mule/smtp http://www.mulesoft.org/schema/mule/smtp/3.3/mule-smtp.xsd
http://www.mulesoft.org/schema/mule/smtps http://www.mulesoft.org/schema/mule/smtps/current/mule-smtps.xsd
http://www.mulesoft.org/schema/mule/twilio http://www.mulesoft.org/schema/mule/twilio/1.0/mule-twilio.xsd">
<service name="tool.muleservice.emailServiceintegration">
<inbound>
<inbound-endpoint ref="tool.endpoint.emailNotification"/>
</inbound>
<outbound>
<pass-through-router>
<outbound-endpoint ref="tool.smtp.endpoint.emailNotification"/>
</pass-through-router>
</outbound>
</service>
<smtps:endpoint name="tool.smtp.endpoint.emailNotification"
user="#[message.inboundProperties['userName']]"
password="#[message.inboundProperties['password']]"
host="smtp.gmail.com"
port="465"
from="dummy.DevGroup%40gmail.com"
transformer-refs="customEmailTransformer"
connector-ref="myTSLSMTPConnnector">
</smtps:endpoint>
<smtps:connector name="myTSLSMTPConnnector">
<smtps:tls-client path="../cacerts" storePassword="changeit" />
<smtps:tls-trust-store path="../cacerts" storePassword="changeit" />
</smtps:connector>
I updated the xml file as below content, to use smtp-gmail-connector given here
<service name="tool.muleservice.emailServiceintegration">
<inbound>
<inbound-endpoint
ref="tool.endpoint.emailNotification" />
</inbound>
<outbound>
<pass-through-router>
<!-- <outbound-endpoint ref="tool.smtp.endpoint.emailNotification"/> -->
<smtp:outbound-endpoint connector-ref="smtpGmailConnector"
subject="test msg"
address="smtps://#[message.inboundProperties['userName']]:#[message.inboundProperties['password']]#smtp.gmail.com"
responseTimeout="10000" doc:name="Send notification email" />
</pass-through-router>
</outbound>
</service>
<smtp:gmail-connector name="smtpGmailConnector"
contentType="text/html" fromAddress="iip.claims.test#gmail.com"
replyToAddresses="iip.claims.test#gmail.com" >
<smtp:header key="foo" value="bar" />
<smtp:header key="baz" value="boz" />
</smtp:gmail-connector>
But after this I am getting below error:
Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/myApp-component-config/component-config.xml]
Offending resource: mule-bootstrap-config.xml; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/myApp-integration-config/tool-mule-bootstrap-config.xml]
Offending resource: URL [vfs:/D:/Software/JBoss/jboss-eap-7.2/standalone/deployments/myApp.war/WEB-INF/lib/tool-intrg.jar/myApp-component-config/component-config.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath*:/myApp-integration-config/tool-intrg-flows.xml]
Offending resource: URL [vfs:/D:/Software/JBoss/jboss-eap-7.2/standalone/deployments/myApp.war/WEB-INF/lib/tool-intrg.jar/myApp-integration-config/tool-mule-bootstrap-config.xml]; nested exception is org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 91 in XML document from URL [vfs:/D:/Software/JBoss/jboss-eap-7.2/standalone/deployments/myApp.war/WEB-INF/lib/tool-intrg.jar/myApp-integration-config/tool-intrg-flows.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 91; columnNumber: 67; The prefix "doc" for attribute "doc:name" associated with an element type "smtp:outbound-endpoint" is not bound.
at deployment.myApp.war//org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:70)
at deployment.myApp.war//org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:85)
at deployment.myApp.war//org.springframework.beans.factory.parsing.ReaderContext.error(ReaderContext.java:76)
at deployment.myApp.war//org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.importBeanDefinitionResource(DefaultBeanDefinitionDocumentReader.java:235)
Any help will be appreciated.
There are many details missing however on rereading the issue I suspect you are not following the deprecated syntax <service> correctly by trying to use a current example. Since that syntax has been deprecated for 6+ years, I would advice to move to the more current <flow> definitions.
In case you are unable or unwilling to migrate, you need to define an endpoint outside the service and reference it you could try the following steps:
Ensure that the namespaces at the beginning of the file are correct. The error mentions that doc: is not recognized. Maybe the namespaces are outdated.
Ensure that the dependencies in the pom reference your Mule 3.9.x release and not an older version that may not define doc.
Try moving <smtp:outbound-endpoint> to a separate endpoint definition and reference it from the <pass-through-router> as in your original implementation.
Example:
<service name="tool.muleservice.emailServiceintegration">
<inbound>
<inbound-endpoint ref="tool.endpoint.emailNotification"/>
</inbound>
<outbound>
<pass-through-router>
<outbound-endpoint ref="tool.smtp.endpoint.gmailNotification"/>
</pass-through-router>
</outbound>
</service>
<smtps:endpoint name="tool.smtp.endpoint.gmailNotification"
connector-ref="smtpGmailConnector"
subject="test msg"
address="smtps://#[message.inboundProperties['userName']]:#[message.inboundProperties['password']]#smtp.gmail.com"
responseTimeout="10000" doc:name="Send notification email" >
</smtps:endpoint>
<smtp:gmail-connector name="smtpGmailConnector"
contentType="text/html" fromAddress="iip.claims.test#gmail.com"
replyToAddresses="iip.claims.test#gmail.com" >
<smtp:header key="foo" value="bar" />
<smtp:header key="baz" value="boz" />
</smtp:gmail-connector>
Finally if everything else fails you could try removing the doc:name attribute and see what happens.

Using tHashOutput and tHashInput in Talend esb

I am trying to merge two responses using tHashOutput -> tHashInput, so firstly I am trying to use it for simple, straightforward job and it doesn't work. I send via Soap UI request with ID, then based on this ID retrive name from DB and show it as result. Data are inserted into hashOutput, but aren't there in hashInput.
WSDL:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<wsdl:definitions name="customerSoap"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://www.talend.org/service/"
targetNamespace="http://www.talend.org/service/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.talend.org/service/">
<s:element name="getCustomer">
<s:complexType>
<s:sequence>
<s:element name="customerId" type="s:integer"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getCustomerResponse">
<s:complexType>
<s:sequence>
<s:element name="getCustomerResult" type="s:string"/>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getCustomerName">
<s:complexType>
<s:sequence>
<s:element name="customerId" type="s:integer"></s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getCustomerNameResponse">
<s:complexType>
<s:sequence>
<s:element name="customerNameResult" type="s:string"></s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getCustomerAddress">
<s:complexType>
<s:sequence>
<s:element name="customerId" type="s:integer"></s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="getCustomerAddressResponse">
<s:complexType>
<s:sequence>
<s:element name="customerAddressResult" type="s:string"></s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="getCustomerRequest">
<wsdl:part element="tns:getCustomer" name="parameters"/>
</wsdl:message>
<wsdl:message name="getCustomerResponse">
<wsdl:part element="tns:getCustomerResponse" name="parameters"/>
</wsdl:message>
<wsdl:message name="getCustomerNameRequest">
<wsdl:part name="parameters" element="tns:getCustomerName"></wsdl:part>
</wsdl:message>
<wsdl:message name="getCustomerNameResponse">
<wsdl:part name="parameters" element="tns:getCustomerNameResponse"></wsdl:part>
</wsdl:message>
<wsdl:message name="getCustomerAddressRequest">
<wsdl:part name="parameters" element="tns:getCustomerAddress"></wsdl:part>
</wsdl:message>
<wsdl:message name="getCustomerAddressResponse">
<wsdl:part name="parameters" element="tns:getCustomerAddressResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="customerSoap">
<wsdl:operation name="getCustomer">
<wsdl:input message="tns:getCustomerRequest"/>
<wsdl:output message="tns:getCustomerResponse"/>
</wsdl:operation>
<wsdl:operation name="getCustomerName">
<wsdl:input message="tns:getCustomerNameRequest"/>
<wsdl:output message="tns:getCustomerNameResponse"/>
</wsdl:operation>
<wsdl:operation name="getCustomerAddress">
<wsdl:input message="tns:getCustomerAddressRequest"/>
<wsdl:output message="tns:getCustomerAddressResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="customerSoap" type="tns:customerSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="getCustomer">
<soap:operation soapAction="http://www.talend.org/service/getCustomer" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getCustomerName">
<soap:operation soapAction="http://www.talend.org/service/getCustomer" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getCustomerAddress">
<soap:operation soapAction="http://www.talend.org/service/getCustomer" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="airport">
<wsdl:port binding="tns:customerSoap" name="customerSoap">
<soap:address location="http://localhost:8090/esb/customerSoap"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Exception:
Starting job customerSoap_getCustomerName at 10:31 31/03/2016.
[statistics] connecting to socket on port 3524
[statistics] connected
mar 31, 2016 10:31:04 AM org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean buildServiceFromWSDL
INFO: Creating Service {http://www.talend.org/service/}airport from WSDL: C:/Users/VKAROL/Downloads/TESB/Studio/workspace/FINAL10/services/customerSoap_0.1.wsdl
mar 31, 2016 10:31:05 AM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be http://localhost:8090/esb/customerSoap
2016-03-31 10:31:05.163:INFO:oejs.Server:jetty-8.1.14.v20131031
2016-03-31 10:31:05.221:INFO:oejs.AbstractConnector:Started SelectChannelConnector#localhost:8090
web service [endpoint: http://localhost:8090/esb/customerSoap] published
mar 31, 2016 10:31:08 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://www.talend.org/service/}airport#{http://www.talend.org/service/}getCustomerName has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not generate the XML stream caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [2,0].
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:94)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:54)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:48)
at org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:136)
at org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:83)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:251)
at org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(JettyHTTPDestination.java:234)
at org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHandler.java:70)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1088)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1024)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [2,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:685)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2141)
at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2047)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1131)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:771)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:701)
at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:625)
at org.apache.cxf.databinding.source.XMLStreamDataWriter.write(XMLStreamDataWriter.java:91)
... 28 more
Here is how my job looks like:
My tXMLMap:
Thank you for help.
Answer from Shong from Talend Team on official forum:
Hi
I think this is because 'keep listening' box is checked on tESBRequestProvider, tHashInput linked with onsubjobOK will never work. To resolve it, change the job design to:
tESBRequestProvider.....tHashOutput--oncomponentok-tHashInput--main--tESBResponseProvider
Regards
Shong

Mule Web Service Consumer not adding SOAP wrapper properly

I'm trying to set up a flow that involves taking in a JSON payload through an HTTP endpoint, transforming it into an XML payload to be used for a SOAP transaction, then turned back into a JSON payload, much like in this demo here: https://www.youtube.com/watch?v=XyZcI1_MbOo.
Now, I'm setting up the flow, and have the Web Service Consumer component up and running. Trying to debug the flow, I'm simply doing the first transformation to XML, sending the message to the Web Service Consumer, and then writing the resultant message to a file. My flow is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:metadata="http://www.mulesoft.org/schema/mule/metadata" xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" xmlns:ws="http://www.mulesoft.org/schema/mule/ws" xmlns:json="http://www.mulesoft.org/schema/mule/json" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:wmq="http://www.mulesoft.org/schema/mule/ee/wmq" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/wmq http://www.mulesoft.org/schema/mule/ee/wmq/current/mule-wmq-ee.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/ee/dw http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd
http://www.example.org/Transactions/">
<http:listener-config name="HTTP_Listener_Configuration" host="10.14.5.211" port="8081" doc:name="HTTP Listener Configuration"/>
<ws:consumer-config name="Web_Service_Consumer" wsdlLocation="Transactions.wsdl" service="Transactions" port="TransactionsSOAP" serviceAddress="http://www.example.org/Transactions/" doc:name="Web Service Consumer"/>
<flow name="soapboxFlow">
<http:listener config-ref="HTTP_Listener_Configuration" path="*" doc:name="HTTP"/>
<dw:transform-message doc:name="Transform Message" metadata:id="1639d844-c95e-4feb-bda5-6258ec392591">
<dw:set-payload><![CDATA[%dw 1.0
%output application/xml
%namespace ns0 http://www.example.org/Transactions/
---
{
ns0#makePayment: {
cId: payload.payments.account_no,
noTrans: 1,
payList: {
(payload.payments map ((payment , indexOfPayment) -> {
pay: {
aNum: payment.account_no,
aName: payment.account_no,
am: payment.amount,
ref: payment.description,
des: payment.description,
qu: payment.quantity
}
}))
}
}
}]]></dw:set-payload>
</dw:transform-message>
<ws:consumer config-ref="Web_Service_Consumer" doc:name="Web Service Consumer" operation="makePayment"/>
</flow>
</mule>
(sorry for all the spacing in the DW component). The associated WSDL looks like this:
<?xml version="1.0" encoding="UTF-8"?><wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="Transactions" targetNamespace="http://www.example.org/Transactions/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.org/Transactions/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:documentation>
<wsdl:appinfo source="WMQI_APPINFO">
<MRWSDLAppInfo imported="true">
<binding hasEncoding="false" imported="true" name="TransactionsSOAP" originalBindingStyle="document"/>
</MRWSDLAppInfo>
</wsdl:appinfo>
</wsdl:documentation>
<wsdl:types>
<xsd:schema targetNamespace="http://www.example.org/Transactions/" xmlns:testSchExtn="http://www.test.com/schema/extensions/">
<xsd:include schemaLocation="Transactions_InlineSchema1.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="retrieveTransactionsRequest">
<wsdl:part element="tns:transactionRequest" name="transactionRequest"/>
</wsdl:message>
<wsdl:message name="retrieveTransactionsResponse">
<wsdl:part element="tns:transactionResponse" name="transactionResponse"/>
</wsdl:message>
<wsdl:message name="makePaymentRequest">
<wsdl:part element="tns:makePayment" name="paymentRequest"/>
</wsdl:message>
<wsdl:message name="makePaymentResponse">
<wsdl:part element="tns:makePaymentResponse" name="paymentResponse"/>
</wsdl:message>
<wsdl:portType name="Transactions">
<wsdl:operation name="retrieveTransactions">
<wsdl:input message="tns:retrieveTransactionsRequest"/>
<wsdl:output message="tns:retrieveTransactionsResponse"/>
</wsdl:operation>
<wsdl:operation name="makePayment">
<wsdl:input message="tns:makePaymentRequest"/>
<wsdl:output message="tns:makePaymentResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TransactionsSOAP" type="tns:Transactions">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="retrieveTransactions">
<soap:operation soapAction="http://www.example.org/Transactions/retrieveTransactions"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="makePayment">
<soap:operation soapAction="http://www.example.org/Transactions/makePayment"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Transactions">
<wsdl:port binding="tns:TransactionsSOAP" name="TransactionsSOAP">
<soap:address location="www.example.com"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Finally, when I input my sample JSON file into the flow, and look at the output result, I get this file:
Response was of unexpected text/html ContentType. Incoming portion of HTML stream: <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
<script type="text/javascript" src="http://gp1.wpc.edgecastcdn.net/00222B/jtest/tpbeacontest.js"></script>
</body>
</html>
. Failed to route event via endpoint: org.mule.module.cxf.CxfOutboundMessageProcessor. Message payload is of type: PushbackInputStream
So clearly, something is getting mucked up -- I don't know why the content type in the resultant file was of text/html, as I certainly didn't configure it that way. Any suggestions as to where I've gone wrong?
Your config not readable but my guess is that you don't have an endpoint after cxf component (outbound-endpoint) see below as its needed.
<mule ...>
................ initial flow
<cxf:jaxws-client operation="yourOperation" clientClass="com.abc.ws.endpoints.XYZService" port="port" enableMuleSoapHeaders="true" doc:name="docName">
<cxf:jaxb-databinding/>
</cxf:jaxws-client>
<outbound-endpoint address="http://localhost:8080/my/url/enpoint" doc:name="documentName" exchange-pattern="request-response"/>**
<echo-component doc:name="Echo"/>
</flow>
</mule>
You received a 404 looks like the service is not available from Mule.
Are you behind a proxy or firewall, are you able to call this operation from another tool as SOAP UI?
I've taken a look at the WSDL and Mule configuration provided and can see that you have configured your web service location at http://www.example.org/Transactions/ but it doesn't look like there's a web service there. Unless your positive this should work, I'd say that's the case.
If you want to try a Web Service that's public and responsive check out http://www.webservicex.net/globalweather.asmx?WSDL
For future reference, it's advisable to enable wire logging to see what's going on when troubleshooting this issues. Just add the following o the log4j2.xml file
<AsyncLogger name="org.mule.module.http.internal.HttpMessageLogger" level="DEBUG" />
<AsyncLogger name="com.ning.http" level="DEBUG" />

SOAP parameters passed to Nav 2013 R2 cause error as if they are null

I`m trying to call a Nav 2013 R2 web service codeunit with a custom SOAP command and I get a response indicating that the parameters being passed are null, which they are not.
Does anyone have an answer as to why this is happening or could point me in a direction that could help solve this? Thanks!
Here is the SOAP request:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><TransferOrderCreate xmlns="urn:microsoft-dynamics-schemas/Codeunit/WebTestCodeunit"><ptext>this is some text</ptext><pint>999</pint></TransferOrderCreate></soap:Body></soap:Envelope>
Here is the SOAP response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Body><s:Fault><faultcode xmlns:a="urn:microsoft-dynamics-schemas/error">a:Microsoft.Dynamics.Nav.Service.WebMetadata.ServiceBrokerException</faultcode><faultstring xml:lang="en-CA">Parameter ptext in method TransferOrderCreate in service WebTestCodeunit is null! </faultstring><detail><string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Parameter ptext in method TransferOrderCreate in service WebTestCodeunit is null! </string></detail></s:Fault></s:Body></s:Envelope>
Here is the service as exposed by Nav:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:microsoft-dynamics-schemas/codeunit/WebTestCodeunit" targetNamespace="urn:microsoft-dynamics-schemas/codeunit/WebTestCodeunit" debug="true">
<script id="FirebugLite" firebugIgnore="true" extension="Chrome"/>
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:microsoft-dynamics-schemas/codeunit/WebTestCodeunit">
<element name="TransferOrderCreate">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="ptext" type="string"/>
<element minOccurs="1" maxOccurs="1" name="pint" type="int"/>
</sequence>
</complexType>
</element>
<element name="TransferOrderCreate_Result">
<complexType>
<sequence>
<element minOccurs="1" maxOccurs="1" name="return_value" type="string"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="TransferOrderCreate">
<part name="parameters" element="tns:TransferOrderCreate"/>
</message>
<message name="TransferOrderCreate_Result">
<part name="parameters" element="tns:TransferOrderCreate_Result"/>
</message>
<portType name="WebTestCodeunit_Port">
<operation name="TransferOrderCreate">
<input name="TransferOrderCreate" message="tns:TransferOrderCreate"/>
<output name="TransferOrderCreate_Result" message="tns:TransferOrderCreate_Result"/>
</operation>
</portType>
<binding name="WebTestCodeunit_Binding" type="tns:WebTestCodeunit_Port">
<binding xmlns="http://schemas.xmlsoap.org/wsdl/soap/" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="TransferOrderCreate">
<operation xmlns="http://schemas.xmlsoap.org/wsdl/soap/" soapAction="urn:microsoft-dynamics-schemas/codeunit/WebTestCodeunit:TransferOrderCreate" style="document"/>
<input name="TransferOrderCreate">
<body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
</input>
<output name="TransferOrderCreate_Result">
<body xmlns="http://schemas.xmlsoap.org/wsdl/soap/" use="literal"/>
</output>
</operation>
</binding>
<service name="WebTestCodeunit">
<port name="WebTestCodeunit_Port" binding="tns:WebTestCodeunit_Binding">
<address xmlns="http://schemas.xmlsoap.org/wsdl/soap/" location="http://lt0619.xx.xxxxxxxxx.xx:11047/Trunk/WS/7002/Codeunit/WebTestCodeunit"/>
</port>
</service>
</definitions>
Check namespaces in wsdl definition and your request. Namespaces are case sensitive.
wsdl:
urn:microsoft-dynamics-schemas/codeunit/WebTestCodeunit
reqest:
urn:microsoft-dynamics-schemas/Codeunit/WebTestCodeunit
This could throw the exception you see.

JAXB validation returning non-required fields

I am validating a Java object using the Validator API. THis works as far as telling me that the object is not valid according to the schema, but it gives a very vague error message that one of the elements from a list of all the element's properties are missing.
Schema (truncated for clarity):
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://predictivesolutions.com/schema/v1_1" xmlns:snt="http://predictivesolutions.com/schema/v1_1"
elementFormDefault="qualified">
<xs:element name="contactInsert">
<xs:complexType>
<xs:all>
<xs:element name="suffix" type="snt:stringType255"
minOccurs="0" maxOccurs="1" />
<xs:element name="firstName" type="snt:stringType255"
minOccurs="1" maxOccurs="1" />
<xs:element name="lastName" type="snt:stringType255"
minOccurs="1" maxOccurs="1" />
<xs:element name="companyID" type="snt:idType" minOccurs="1"
maxOccurs="1" />
<xs:element name="companyLocationID" type="snt:idType"
minOccurs="1" maxOccurs="1" />
<xs:element name="workPhone" type="snt:phoneType"
minOccurs="0" maxOccurs="1" />
<xs:element name="cellPhone" type="snt:phoneType"
minOccurs="0" maxOccurs="1" />
<xs:element name="homePhone" type="snt:phoneType"
minOccurs="0" maxOccurs="1" />
<xs:element name="otherPhone" type="snt:phoneType"
minOccurs="0" maxOccurs="1" />
I am basically deserializing a JSON object to the JAXB generated class from the schema above. Again this works:
ValidationErrorHandler errorHandler = null;
try {
JAXBContext jc = JAXBContext.newInstance(ContactInsert.class);
JAXBSource source = new JAXBSource(jc, contactInsert);
SchemaFactory sf = SchemaFactory
.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = sf.newSchema(ContactInsert.class
.getResource("/xsd/v1_1/contact.xsd"));
Validator validator = schema.newValidator();
errorHandler = new ValidationErrorHandler();
validator.setErrorHandler(errorHandler);
validator.validate(source);
My JSON object gets converted to the ContactInsert instance:
{ "companyID":666, "lastName":"dsadasd", "companyLocationID":23950, "otherComments":null }
I would expect the validation error to be that "firstName" is expected, however it lists every element from the schema, even though these are not required (minOccurs=0 and not annotated with #Required in the generated Java class:
"cvc-complex-type.2.4.b: The content of element 'contactInsert' is not
complete. One of
'{"http://predictivesolutions.com/schema/v1_1":suffix,
"http://predictivesolutions.com/schema/v1_1":firstName,
"http://predictivesolutions.com/schema/v1_1":workPhone,
"http://predictivesolutions.com/schema/v1_1":cellPhone,
"http://predictivesolutions.com/schema/v1_1":homePhone,
"http://predictivesolutions.com/schema/v1_1":otherPhone,
"http://predictivesolutions.com/schema/v1_1":faxPhone,
"http://predictivesolutions.com/schema/v1_1":email,
"http://predictivesolutions.com/schema/v1_1":isDesignate,
"http://predictivesolutions.com/schema/v1_1":isActive,
"http://predictivesolutions.com/schema/v1_1":mainSponsorID,
"http://predictivesolutions.com/schema/v1_1":hidePercentSafeFlag,
"http://predictivesolutions.com/schema/v1_1":externalContactID,
"http://predictivesolutions.com/schema/v1_1":useAsARef,
"http://predictivesolutions.com/schema/v1_1":positionTitle,
"http://predictivesolutions.com/schema/v1_1":otherComments,
"http://predictivesolutions.com/schema/v1_1":formerCompanyID,
"http://predictivesolutions.com/schema/v1_1":industryStartDate,
"http://predictivesolutions.com/schema/v1_1":employmentStartDate}' is
expected."
Is it possible to configure the validator to only report the required field ("firstName"). I am relatively new to JAXB, but it seems like that error message is not accurate, and that JAXB is simply taking the easy way out by saying one of the elements is missing, but I will not tell you which.
Where is the Error Coming From
The error message being returned is from the javax.xml.validation.Validator and not JAXB. In this use case JAXB is simply the XML source. If you swapped in a StAXSource the StAX parser wouldn't become responsible for the schema validation.
Is it a Good Error?
OK...but why does validator report all those fields in the error
message?
Here is the error you are getting:
"cvc-complex-type.2.4.b: The content of element 'contactInsert' is not
complete. One of
'{"http://predictivesolutions.com/schema/v1_1":suffix,
"http://predictivesolutions.com/schema/v1_1":firstName,
"http://predictivesolutions.com/schema/v1_1":workPhone,
"http://predictivesolutions.com/schema/v1_1":cellPhone,
"http://predictivesolutions.com/schema/v1_1":homePhone,
"http://predictivesolutions.com/schema/v1_1":otherPhone,
"http://predictivesolutions.com/schema/v1_1":faxPhone,
"http://predictivesolutions.com/schema/v1_1":email,
"http://predictivesolutions.com/schema/v1_1":isDesignate,
"http://predictivesolutions.com/schema/v1_1":isActive,
"http://predictivesolutions.com/schema/v1_1":mainSponsorID,
"http://predictivesolutions.com/schema/v1_1":hidePercentSafeFlag,
"http://predictivesolutions.com/schema/v1_1":externalContactID,
"http://predictivesolutions.com/schema/v1_1":useAsARef,
"http://predictivesolutions.com/schema/v1_1":positionTitle,
"http://predictivesolutions.com/schema/v1_1":otherComments,
"http://predictivesolutions.com/schema/v1_1":formerCompanyID,
"http://predictivesolutions.com/schema/v1_1":industryStartDate,
"http://predictivesolutions.com/schema/v1_1":employmentStartDate}' is
expected."
This implementation has chosen to list all of the possible elements that may occur here. If only the required elements where listed someone could have opened a question similar to this one as to why the optional elements were omitted.