当前位置:   article > 正文

Apache Ofbiz Web Services调用一则_ofbiz webtools map 传入

ofbiz webtools map 传入

启用Ofbiz的创建用户Web Services,搜索下我前面的文章吧

http://192.168.1.107:8080/webtools/control/SOAPService/createPersonAndUserLogin?wsdl
使

eclipse Web Services Explorer,自己构造请求body
http://127.0.0.1:49862/wse/wsexplorer/wsexplorer.jsp


<map-Map>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="currentPassword"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="current"/>
    </ns0:map-Value>
  </ns0:map-Entry>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="currentPasswordVerify"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="current"/>
    </ns0:map-Value>
  </ns0:map-Entry>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="userLoginId"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="zzzz"/>
    </ns0:map-Value>
  </ns0:map-Entry>

</map-Map>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28

SOAP请求:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="http://ofbiz.apache.org/service/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <soapenv:Body>
    <ns0:createPersonAndUserLogin>
      <map-Map>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="currentPassword"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="current"/>
    </ns0:map-Value>
  </ns0:map-Entry>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="currentPasswordVerify"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="current"/>
    </ns0:map-Value>
  </ns0:map-Entry>
  <ns0:map-Entry>
    <ns0:map-Key>
      <ns0:std-String value="userLoginId"/>
    </ns0:map-Key>
    <ns0:map-Value>
      <ns0:std-String value="zzzz"/>
    </ns0:map-Value>
  </ns0:map-Entry>

</map-Map>
    </ns0:createPersonAndUserLogin>
  </soapenv:Body>
</soapenv:Envelope>
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33

SOAP返回结果:



<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Body>
    <createPersonAndUserLoginResponse xmlns="http://ofbiz.apache.org/service/">
      <map-Map>
        <map-Entry>
            <map-Key>
                <std-String value="responseMessage"/>
            </map-Key>
            <map-Value>
                <std-String value="success"/>
            </map-Value>
        </map-Entry>
        <map-Entry>
            <map-Key>
                <std-String value="newUserLogin"/>
            </map-Key>
            <map-Value>
                <eeval-UserLogin createdStamp="2016-10-18 06:56:53.933" createdTxStamp="2016-10-18 06:56:53.465" currentPassword="$SHA$O60VEwXuU0s$VnOxf3S6SU-rlVe20rqYzI4gfDY" lastUpdatedStamp="2016-10-18 06:56:53.933" lastUpdatedTxStamp="2016-10-18 06:56:53.465" partyId="10010" userLoginId="zzzz"/>
            </map-Value>
        </map-Entry>
        <map-Entry>
            <map-Key>
                <std-String value="partyId"/>
            </map-Key>
            <map-Value>
                <std-String value="10010"/>
            </map-Value>
        </map-Entry>
    </map-Map>
    </createPersonAndUserLoginResponse>
  </soapenv:Body>
</soapenv:Envelope>

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36

测试:
用增加的用户名zzzz/current登录Ofbiz电商平台 http://xxxx:8080/ecommerce,happy购物吧

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/你好赵伟/article/detail/856301
推荐阅读
  

闽ICP备14008679号