0
Camel CXF 구성 요소를 사용할 수 없습니다. 문제는 내가 호출하고자하는 WS 조작에는 JSON 표현식 인 String 매개 변수 만 있습니다.Camel CXF 구성 요소 : Json String 본문을 사용하여 전화를 겁니다
그러나 모든 dataFormat (MESSAGE, POJO, PAYLOAD)에서 예외가 발생합니다.
wxdl2java에서 cxf를 통해 생성되는 클래스가 있으며 ws를 호출하기 위해이 클래스를 사용하고 있습니다.
<cxf:cxfEndpoint id="wsEndpoint" address="http://www.wssss.com" serviceClass="aa.bb.cc.WebService" serviceName="sendMessage">
<cxf:properties>
<entry key="dataFormat" value="CXF_MESSAGE"/>
<entry key="defaultOperationName" value="sendMessage"/>
<entry key="relayHeaders" value="false"/>
<entry key="wrapped" value="true"/>
<entry key="loggingFeatureEnabled" value="true"/>
<entry key="synchronous" value="true"/>
<entry key="defaultOperationNamespace" value="http://com.asdad.ns"/>
</cxf:properties>
</cxf:cxfEndpoint>
내가이 사용하고 있습니다 :
camel:to uri="cxf:bean:wsEndpoint"/>
그리고 생성 된 서비스 클래스는 다음과 같습니다
@WebResult(name = "response", targetNamespace = "")
@RequestWrapper(localName = "sendMessage", targetNamespace = "http://com.xxx.comet.ws.notification", className = "aaa.bbb.ccc.SendMessage")
@WebMethod
@ResponseWrapper(localName = "sendMessageResponse", targetNamespace = "http://com.xxx.comet.ws.notification", className = "aaa.bbb.ccc.SendMessageResponse")
public java.lang.String sendMessage(
@WebParam(name = "request", targetNamespace = "")
java.lang.String request
);
어떤 도움이
감사
을 이해할 수있을 것이다편집 : 문제는, e입니다. xchange.in body가 서비스 메소드의 매개 변수로 바인드 될 수 없으므로 요청은 비어 있습니다. 여기에 문제가 있습니다
INFO: Outbound Message
---------------------------
ID: 1
Address: http://www.wssss.com
Encoding: UTF-8
Http-Method: POST
Content-Type: text/xml
Headers: {Accept=[*/*], breadcrumbId=[ID-TT08328507-61662-1416561287466-0-1], SOAPAction=[""]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><SOAP-ENV:Header xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"/><soap:Body/></soap:Envelope>
--------------------------------------
Nov 21, 2014 4:45:04 AM org.apache.cxf.services.sendMessage.MessagePort.Message
INFO: Inbound Message
----------------------------
ID: 1
Response-Code: 500
Encoding: UTF-8
Content-Type: text/xml;charset=UTF-8
Headers: {connection=[close], Content-Length=[271], content-type=[text/xml;charset=UTF-8], Date=[Fri, 21 Nov 2014 09:15:04 GMT], Server=[Apache-Coyote/1.1]}
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>No binding operation info while invoking unknown method with params unknown.</faultstring></soap:Fault></soap:Body></soap:Envelope>
--------------------------------------
org.apache.cxf.binding.soap.SoapFault: No binding operation info while invoking unknown method with params unknown.
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:84)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:51)
at org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:40)
예외가 있다고합니다. 예외는 무엇입니까? 경로도 제공하십시오. – Ray
@ 레이 편집했습니다 ... – Neron
http://stackoverflow.com/help/mcve를 참조하십시오. – Ray