SOAP请求数据不会转到SpringBoot中的外部系统

时间:2018-06-02 01:26:07

标签: java spring-boot soap soap-client soapserver

我正在尝试将请求数据发送到外部soap服务器,但是在对外部肥皂服务器的请求中数据将变为空。

请找到如下代码:

UserListResponse response = null;

@PayloadRoot(namespace = NAMESPACE_URI, localPart = "UserList")
@ResponsePayload
public UserListResponse UserListRequest(@RequestPayload UserListRequest request) throws Exception {

    System.out.println("Enters into UserList()");
    try {


       //Client call

       UserServicesLocator locator = new UserServicesLocator();
       UserServicesSoapStub stub = (UserServicesSoapStub) locator.getUserServicesSoap();

        response = stub.userList(request);//here the request data values not mapping at external system side

        } catch(Exception e) {
             e.printStackTrace();
          }
        return response;
}

SOAP UI请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:prim="http://*****/UserServices">
   <soapenv:Header/>
   <soapenv:Body>
      <prim:UserList>
         <!--Optional:-->
         <prim:XMLRequest>
            <!--Optional:-->
            <prim:Header>
               <!--Optional:-->
               <prim:MessageID>1</prim:MessageID>
               <!--Optional:-->
               <prim:CorrelationID>1</prim:CorrelationID>
               <!--Optional:-->
               <prim:SystemID>C</prim:SystemID>
               <!--Optional:-->
               <prim:RequestorID>1</prim:RequestorID>
            </prim:Header>
            <prim:Reference>Account</prim:Reference>
            <!--Optional:-->
            <prim:Number>100987600</prim:Number>

         </prim:XMLRequest>
      </prim:UserList>
   </soapenv:Body>
</soapenv:Envelope>

请求正在访问外部Soap服务器,但Soap服务器将请求中的所有值(Header和amp数据)都取为null。

即使我从SOAP UI传递值,我也无法理解为什么值为null。

即使我在这里做错了也没有得到。任何人都可以帮忙。

0 个答案:

没有答案
相关问题