2013-01-23 2 views
0

mule에서 rpc/literal 스타일 webservice에 액세스하고 있습니다. 나는 HTTP에 expectedobject을 전달하고 그 다음cxf : jaxws-client 사용 중에 soap : encodingStyle 속성을 soap : body에 추가하십시오.

<binding name="AppWebServiceBinding" type="interface:AppWebService"> 
    <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> 
    <operation name="submitApplication"> 
     <soap:operation soapAction="" style="rpc" /> 
     <input name="submitApplicationRequest" > 
      <soap:body 
       encodingStyle="http://xml.apache.org/xml-soap/literalxml" 
       namespace="http://tempuri.org/fsg.ejb.webservice.AppWebService" 
       parts="ele" use="literal" type="soap:tBody" /> 
     </input> 
     <output name="submitApplicationResponse"> 
      <soap:body 
       encodingStyle="http://xml.apache.org/xml-soap/literalxml" 
       namespace="http://tempuri.org/fsg.ejb.webservice.AppWebService" use="literal"/> 
     </output> 
    </operation> 
</binding> 

: 아래와 같은

는 WSDL의 바인딩 부분은 보이는 잭스 - WS 클라이언트

<http:outbound-endpoint exchange-pattern="request-response" 
     address="http://serviceapp:9080/service_war/servlet/rpcrouter" 
     doc:name="Generic"> 
     <cxf:jaxws-client clientClass="com.fsg.generated.AppWebServiceService" 
      wsdlLocation="com/fsg/generated/AppWebServiceService.wsdl"    
      operation="submitApplication" port="AppWebServicePort"     
      doc:name="SOAP">     
      <cxf:inInterceptors > 
      <spring:bean id="inLogger" 
       class="org.apache.cxf.interceptor.LoggingInInterceptor" />     
      </cxf:inInterceptors> 
      <cxf:outInterceptors> 
      <spring:bean id="outLogger" 
       class="org.apache.cxf.interceptor.LoggingOutInterceptor" /> 
     </cxf:outInterceptors>    
     </cxf:jaxws-client> 
    </http:outbound-endpoint> 

을하지만 난으로 볼 때 : CXF와 아웃 바운드 로그를 통해 아웃 바운드로 전송되는 메시지보기 soap : encodingStyle 속성이 표시되지 않습니다. 이 문제없이 서비스가 메시지를 처리 ​​할 수 ​​없으므로이 문제가 발생합니다.

다음은 로그에서 볼 수있는 아웃 바운드 메시지입니다.

Outbound Message 
--------------------------- 
ID: 1 
Address: http://serviceapp:9080/service_war/servlet/rpcrouter 
Encoding: UTF-8 
Content-Type: text/xml 
Headers: {SOAPAction=[""]} 
Payload: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header> 
<mule:header xmlns:mule="http://www.muleumo.org/providers/soap/1.0"> 
<mule:MULE_CORRELATION_ID>dfd31e6c-6575-11e2-9b8a-b1b06bd39882</mule:MULE_CORRELATION_ID> <mule:MULE_CORRELATION_GROUP_SIZE>-1</mule:MULE_CORRELATION_GROUP_SIZE> 
<mule:MULE_CORRELATION_SEQUENCE>-1</mule:MULE_CORRELATION_SEQUENCE> 
</mule:header> 
</soap:Header> 
<soap:Body> 
<ns1:submitApplication xmlns:ns1="http://tempuri.org/fsg.ejb.webservice.AppWebService"> 
<ele> 
<MyApp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mysample.org"> 
    <UserAuth> ............ 

네임 스페이스는 wsdl에서 가져 왔지만 encodingStyle에서는 가져 오지 않았습니다. 이의 인코딩 스타일 속성 :

예상 출력은 내가 비누를 설정하는 방법

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header> 
<mule:header xmlns:mule="http://www.muleumo.org/providers/soap/1.0"> 
....... 
</mule:header> 
</soap:Header> 
<soap:Body> 
<ns1:submitApplication xmlns:ns1="http://tempuri.org/fsg.ejb.webservice.AppWebService" soap:encodingStyle="http://xml.apache.org/xml-soap/literalxml" > 
<ele> 
<MyApp xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mysample.org"> 
    <UserAuth> ............ 

입니까?

+1

확실하지 않음이 사건을 도움이되지만 다음과 같은 <메시지 속성 - 변압기 범위 = "아웃 바운드"> <추가 메시지 재산권 키 = "인코딩 스타일"값과 같은 메시지 속성 - 변압기 뭔가를 시도 할 수 있다면 = " http : //schemas.xmlsoap.org/soap/encod ...; justMe

+0

Razh, 이것을 시도했습니다. 그러나 운이 없다. : – user1760178

+2

뮬 설명서에 다음과 같이 사용하는 것이 좋습니다. 이미이 방법을 시도한 적이 있는지 확실하지 않습니다. = "myFooProperty"값 = "# [헤더 인바운드 : myFooProperty]"/> justMe

답변

1

나는 그것이 작동하지 않는 것을 볼 수 있었다. XSLT 변환기를 사용하여 인코딩 스타일을 입력에 추가 한 다음 처리되도록 할 수는 있습니다. 이것은 단지 주위의 일입니다.

+0

현재이 방법을 구현했습니다. 스트레이트 솔루션을 찾고 있습니다. – user1760178

-1

여러분의 문제는 encodingStyle 속성 정보가 하위 요소에만 body 요소에 나타날 수 없다고 생각합니다.

+0

네임 스페이스가 선택되어 body 태그에 제대로 표시되는지 확인할 수 있습니다. 그러나 encodingStyle이 나타나지 않습니다. 어떤 생각이 어떻게 해결할 수 있습니까? – user1760178

+0

봉투 태그에 넣으려고 했습니까? – jonfornari