xml - Spring Integration WS Outbound Gateway POC - XMLMarshalException -


i developing poc on spring integration following usecase.

  • subscribing input message (a) remote jms queue
  • transforming input message (a) (b)
  • invoking remote webservice (b) , receiving response

my spring-int config xml has following


<int-ws:outbound-gateway id="marshallinggateway" request-channel="mdmintinputchannel" reply-channel="mdmintoutputchannel"          uri="ws-endpoint" marshaller="marshaller" unmarshaller="marshaller"/>  <oxm:jaxb2-marshaller id="marshaller" contextpath="com.veeaar.ws.types.jaxb"/>  

have jaxb generated source in spring integration proj workspace.

while executing in sts 3.8.3, following error being thrown.

not sure wrong in code. resolving highly appreciated. thanks.

caused by: org.springframework.oxm.marshallingfailureexception: jaxb marshalling exception; nested exception javax.xml.bind.marshalexception  - linked exception: [exception [eclipselink-25007] (eclipse persistence services - 2.6.1.v20150916-55dc7c3): org.eclipse.persistence.exceptions.xmlmarshalexception exception description: descriptor class java.lang.string not found in project.  jaxb, if jaxbcontext bootstrapped using typemappinginfo[] must call marshal method accepts typemappinginfo input parameter.]     @ org.springframework.oxm.jaxb.jaxb2marshaller.convertjaxbexception(jaxb2marshaller.java:908)     @ org.springframework.oxm.jaxb.jaxb2marshaller.marshal(jaxb2marshaller.java:684)     @ org.springframework.ws.support.marshallingutils.marshal(marshallingutils.java:81)     @ org.springframework.integration.ws.marshallingwebserviceoutboundgateway$marshallingrequestmessagecallback.dowithmessageinternal(marshallingwebserviceoutboundgateway.java:129)     @ org.springframework.integration.ws.abstractwebserviceoutboundgateway$requestmessagecallback.dowithmessage(abstractwebserviceoutboundgateway.java:233)     @ org.springframework.ws.client.core.webservicetemplate.dosendandreceive(webservicetemplate.java:590)     @ org.springframework.ws.client.core.webservicetemplate.sendandreceive(webservicetemplate.java:555)     @ org.springframework.integration.ws.marshallingwebserviceoutboundgateway.dohandle(marshallingwebserviceoutboundgateway.java:87)     @ org.springframework.integration.ws.abstractwebserviceoutboundgateway.handlerequestmessage(abstractwebserviceoutboundgateway.java:188)     @ org.springframework.integration.handler.abstractreplyproducingmessagehandler.handlemessageinternal(abstractreplyproducingmessagehandler.java:109)     @ org.springframework.integration.handler.abstractmessagehandler.handlemessage(abstractmessagehandler.java:127)     ... 36 more 

am explaining further poc here understand more why jaxb conversion needed before invoking remote webservice.

the xsl transformation doing in spring integ converts input message of "event" "fetchcodebyname" message given below.

<tns:fetchcodebyname xmlns:tns="http://www.veeaar.com/remote/wsdl/2010-1" xmlns:ns1="http://www.veeaar.com/remote/xml/2010-1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <ns1:code>     <name>xxx</name> </ns1:code> </tns:fetchcodebyname> 

in wsdl, fetchcodebyname mapped codestype of ns1 namespace. have generated jaxb classes 'codes' schema xsd.

before invoking remote web service, if create service activator , try unmarshall transformation output jaxb object, error reporting unmarshalling task expecting 'codes' root element not 'fetchcodebyname'.

how resolve issue?

is there way in spring integration, can invoke remote web service without marshall , unmarshal input message? can't direct xslt output straightway int-ws:outbound-gateway?

why need unmarshal before ws outbound gateway? see, marshal again! use simple ws outbound gateway variant (without marshaller) , send xslt transformer result in input channel is.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -