Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/355.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将原始xml字符串直接发送到soap服务_Java_Soap - Fatal编程技术网

使用java将原始xml字符串直接发送到soap服务

使用java将原始xml字符串直接发送到soap服务,java,soap,Java,Soap,是否可以直接将xml字符串发送到soap服务中,而不是为其生成java类 我们要发送以下xml: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://www.timeedit.se/timeedit3/version2"> <soapenv:Header/> <soapenv:Body> <ver:findObjec

是否可以直接将xml字符串发送到soap服务中,而不是为其生成java类

我们要发送以下xml:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ver="http://www.timeedit.se/timeedit3/version2">
<soapenv:Header/>
<soapenv:Body>
  <ver:findObjects>
     <!--Optional:-->
     <ver:login>
        <username>xxxxxxxx</username>
        <password>xxxxxxxx</password>
        <applicationkey>xxxxxxxxx</applicationkey>
     </ver:login>
     <!--Optional:-->
     <ver:type>t_hel_programtillfälle</ver:type>
     <!--Optional:-->
     <ver:exactsearchfields>
        <!--Zero or more repetitions:-->
        <field>
           <!--Optional:-->
           <extid>f_start_slut_termin</extid>
           <!--Zero or more repetitions:-->
           <value>h11</value>
        </field>
        <field>
           <!--Optional:-->
           <extid>f_start_slut_termin</extid>
           <!--Zero or more repetitions:-->
           <value>v14</value>
        </field>
        <field>
           <!--Optional:-->
           <extid>f_anmälningskod</extid>
           <!--Zero or more repetitions:-->
           <value>10001</value>
        </field>
    </ver:exactsearchfields>
     <!--Optional:-->
     <ver:generalsearchstring></ver:generalsearchstring>
     <!--Optional:-->
     <ver:active>true</ver:active>
     <!--Optional:-->
     <ver:reserved>true</ver:reserved>
     <!--Optional:-->
     <ver:sortorder>?</ver:sortorder>
     <ver:beginindex>0</ver:beginindex>
     <!--Optional:-->
     <ver:numberofobjects>20</ver:numberofobjects>
  </ver:findObjects>

我使用SpringWeb服务做了类似的事情http://static.springsource.org/spring-ws/sites/2.0/. 在Spring@Endpoint方法中,您可以使用xml字符串,但可以将其转换为有效类型之一,例如javax.xml.transform.Source,请参见

我使用SpringWeb服务做了类似的事情http://static.springsource.org/spring-ws/sites/2.0/. 在Spring@Endpoint方法中,您可以使用xml字符串,但可以将其转换为有效类型之一,例如javax.xml.transform.Source,请参见

尝试HTTPURLConnection。请参见尝试HTTPURLConnection。请参见

您可以通过HTTP发布任何您想要的内容。您可以通过HTTP发布任何您想要的内容。