Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/387.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java:自定义/删除Soap请求中的名称空间_Java_Soap - Fatal编程技术网

Java:自定义/删除Soap请求中的名称空间

Java:自定义/删除Soap请求中的名称空间,java,soap,Java,Soap,我从wsdl生成了类 我收到的请求: <?xml version="1.0" ?> <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/"> <S:Body> <ns2:acr_JourneySearch xmlns:ns2="https://...../SoapApi/0.1/"> <access>... ... 要

我从wsdl生成了类

我收到的请求:

<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
   <S:Body>
       <ns2:acr_JourneySearch xmlns:ns2="https://...../SoapApi/0.1/">
           <access>...

...
要求客户:

<?xml version="1.0" encoding="UTF-8"?> 
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns2="https://......./SoapApi/0.1/"> 
  <S:Body> 
    <ns2:acr_JourneySearch> 
      <access>...

...

如何将ns2从一个主体移动到另一个信封?

不太清楚您到底想要实现什么以及为什么。请提供更多详细信息。@VHS客户给了我链接https://...soapApi?wsdl 我生成了类:wsimport-keep-verbosehttps://...soapApi?wsdl 发送请求并获得正确的响应。但客户说请求必须是我上面描述的格式<代码>ns2=”https://...../SoapApi/0.1/“必须不在
中,而在
中。”。我尝试用谷歌搜索它,但只为C#找到解决方案。