Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.45 KB | None | 0 0
  1. <wsdl:definitions xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://implecsa.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://implecsa.org/">
  2. <wsdl:types>
  3. <s:schema elementFormDefault="qualified" targetNamespace="http://implecsa.org/">
  4. <s:element name="LogUserInOut">
  5. <s:complexType>
  6. <s:sequence>
  7. <s:element minOccurs="0" maxOccurs="1" name="user" type="s:string"/>
  8. <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string"/>
  9. <s:element minOccurs="1" maxOccurs="1" name="action" type="s:int"/>
  10. </s:sequence>
  11. </s:complexType>
  12. </s:element>
  13. <s:element name="LogUserInOutResponse">
  14. <s:complexType>
  15. <s:sequence>
  16. <s:element minOccurs="0" maxOccurs="1" name="LogUserInOutResult" type="tns:ResponseInfoStructOfProductoStruct"/>
  17. </s:sequence>
  18. </s:complexType>
  19. </s:element>
  20. <s:complexType name="ResponseInfoStructOfProductoStruct">
  21. <s:complexContent mixed="false">
  22. <s:extension base="tns:GeneralInfoStruct">
  23. <s:sequence>
  24. <s:element minOccurs="0" maxOccurs="1" name="Parameters" type="tns:ArrayOfProductoStruct"/>
  25. </s:sequence>
  26. </s:extension>
  27. </s:complexContent>
  28. </s:complexType>
  29. <s:complexType name="GeneralInfoStruct">
  30. <s:sequence>
  31. <s:element minOccurs="1" maxOccurs="1" name="opcode" type="s:int"/>
  32. <s:element minOccurs="1" maxOccurs="1" name="scopeidentity" type="s:int"/>
  33. <s:element minOccurs="1" maxOccurs="1" name="lastsyncticks" type="s:long"/>
  34. <s:element minOccurs="0" maxOccurs="1" name="message" type="s:string"/>
  35. <s:element minOccurs="1" maxOccurs="1" name="tag" type="s:int"/>
  36. <s:element minOccurs="1" maxOccurs="1" name="tagflags" type="s:int"/>
  37. </s:sequence>
  38. </s:complexType>
  39. <s:complexType name="ArrayOfProductoStruct">
  40. <s:sequence>
  41. <s:element minOccurs="0" maxOccurs="unbounded" name="ProductoStruct" nillable="true" type="tns:ProductoStruct"/>
  42. </s:sequence>
  43. </s:complexType>
  44. <s:complexType name="ProductoStruct">
  45. <s:complexContent mixed="false">
  46. <s:extension base="tns:BaseStruct">
  47. <s:sequence>
  48. <s:element minOccurs="0" maxOccurs="1" name="Nombre" type="s:string"/>
  49. </s:sequence>
  50. </s:extension>
  51. </s:complexContent>
  52. </s:complexType>
  53. <s:complexType name="BaseStruct">
  54. <s:sequence>
  55. <s:element minOccurs="1" maxOccurs="1" name="id" type="s:int"/>
  56. </s:sequence>
  57. </s:complexType>
  58. <s:element name="ResponseInfoStructOfProductoStruct" nillable="true" type="tns:ResponseInfoStructOfProductoStruct"/>
  59. </s:schema>
  60. </wsdl:types>
  61. <wsdl:message name="LogUserInOutSoapIn">
  62. <wsdl:part name="parameters" element="tns:LogUserInOut"/>
  63. </wsdl:message>
  64. <wsdl:message name="LogUserInOutSoapOut">
  65. <wsdl:part name="parameters" element="tns:LogUserInOutResponse"/>
  66. </wsdl:message>
  67. <wsdl:message name="LogUserInOutHttpGetIn">
  68. <wsdl:part name="user" type="s:string"/>
  69. <wsdl:part name="password" type="s:string"/>
  70. <wsdl:part name="action" type="s:string"/>
  71. </wsdl:message>
  72. <wsdl:message name="LogUserInOutHttpGetOut">
  73. <wsdl:part name="Body" element="tns:ResponseInfoStructOfProductoStruct"/>
  74. </wsdl:message>
  75. <wsdl:message name="LogUserInOutHttpPostIn">
  76. <wsdl:part name="user" type="s:string"/>
  77. <wsdl:part name="password" type="s:string"/>
  78. <wsdl:part name="action" type="s:string"/>
  79. </wsdl:message>
  80. <wsdl:message name="LogUserInOutHttpPostOut">
  81. <wsdl:part name="Body" element="tns:ResponseInfoStructOfProductoStruct"/>
  82. </wsdl:message>
  83. <wsdl:portType name="WsRegisterDBSoap">
  84. <wsdl:operation name="LogUserInOut">
  85. <wsdl:input message="tns:LogUserInOutSoapIn"/>
  86. <wsdl:output message="tns:LogUserInOutSoapOut"/>
  87. </wsdl:operation>
  88. </wsdl:portType>
  89. <wsdl:portType name="WsRegisterDBHttpGet">
  90. <wsdl:operation name="LogUserInOut">
  91. <wsdl:input message="tns:LogUserInOutHttpGetIn"/>
  92. <wsdl:output message="tns:LogUserInOutHttpGetOut"/>
  93. </wsdl:operation>
  94. </wsdl:portType>
  95. <wsdl:portType name="WsRegisterDBHttpPost">
  96. <wsdl:operation name="LogUserInOut">
  97. <wsdl:input message="tns:LogUserInOutHttpPostIn"/>
  98. <wsdl:output message="tns:LogUserInOutHttpPostOut"/>
  99. </wsdl:operation>
  100. </wsdl:portType>
  101. <wsdl:binding name="WsRegisterDBSoap" type="tns:WsRegisterDBSoap">
  102. <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
  103. <wsdl:operation name="LogUserInOut">
  104. <soap:operation soapAction="http://implecsa.org/LogUserInOut" style="document"/>
  105. <wsdl:input>
  106. <soap:body use="literal"/>
  107. </wsdl:input>
  108. <wsdl:output>
  109. <soap:body use="literal"/>
  110. </wsdl:output>
  111. </wsdl:operation>
  112. </wsdl:binding>
  113. <wsdl:binding name="WsRegisterDBSoap12" type="tns:WsRegisterDBSoap">
  114. <soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
  115. <wsdl:operation name="LogUserInOut">
  116. <soap12:operation soapAction="http://implecsa.org/LogUserInOut" style="document"/>
  117. <wsdl:input>
  118. <soap12:body use="literal"/>
  119. </wsdl:input>
  120. <wsdl:output>
  121. <soap12:body use="literal"/>
  122. </wsdl:output>
  123. </wsdl:operation>
  124. </wsdl:binding>
  125. <wsdl:binding name="WsRegisterDBHttpGet" type="tns:WsRegisterDBHttpGet">
  126. <http:binding verb="GET"/>
  127. <wsdl:operation name="LogUserInOut">
  128. <http:operation location="/LogUserInOut"/>
  129. <wsdl:input>
  130. <http:urlEncoded/>
  131. </wsdl:input>
  132. <wsdl:output>
  133. <mime:mimeXml part="Body"/>
  134. </wsdl:output>
  135. </wsdl:operation>
  136. </wsdl:binding>
  137. <wsdl:binding name="WsRegisterDBHttpPost" type="tns:WsRegisterDBHttpPost">
  138. <http:binding verb="POST"/>
  139. <wsdl:operation name="LogUserInOut">
  140. <http:operation location="/LogUserInOut"/>
  141. <wsdl:input>
  142. <mime:content type="application/x-www-form-urlencoded"/>
  143. </wsdl:input>
  144. <wsdl:output>
  145. <mime:mimeXml part="Body"/>
  146. </wsdl:output>
  147. </wsdl:operation>
  148. </wsdl:binding>
  149. <wsdl:service name="WsRegisterDB">
  150. <wsdl:port name="WsRegisterDBSoap" binding="tns:WsRegisterDBSoap">
  151. <soap:address location="http://implecsawebservice.azurewebsites.net/wsregisterdb.asmx"/>
  152. </wsdl:port>
  153. <wsdl:port name="WsRegisterDBSoap12" binding="tns:WsRegisterDBSoap12">
  154. <soap12:address location="http://implecsawebservice.azurewebsites.net/wsregisterdb.asmx"/>
  155. </wsdl:port>
  156. <wsdl:port name="WsRegisterDBHttpGet" binding="tns:WsRegisterDBHttpGet">
  157. <http:address location="http://implecsawebservice.azurewebsites.net/wsregisterdb.asmx"/>
  158. </wsdl:port>
  159. <wsdl:port name="WsRegisterDBHttpPost" binding="tns:WsRegisterDBHttpPost">
  160. <http:address location="http://implecsawebservice.azurewebsites.net/wsregisterdb.asmx"/>
  161. </wsdl:port>
  162. </wsdl:service>
  163. </wsdl:definitions>
  164.  
  165. private static void LogInOut() {
  166. LogUserInOut data = new LogUserInOut();
  167. data.user= "admin";
  168. data.password= "admin";
  169. data.action =1;
  170.  
  171. WsRegisterDBSoap service = new WsRegisterDBSoap();
  172. service.Address= urlRegister;
  173. try {
  174. LogUserInOutResponse response = service.LogUserInOut(data);
  175. System.out.println("Resultado = "+response.LogUserInOutResult.opcode);
  176. } catch (Exception e) {
  177. // TODO Auto-generated catch block
  178. e.printStackTrace();
  179. }
  180. }
  181.  
  182. public LogUserInOutResponse LogUserInOut(LogUserInOut params) throws Exception
  183. {
  184. SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
  185. envelope.dotNet = IsDotNet;
  186. envelope.setOutputSoapObject(params.GetSoapParams());
  187.  
  188. new LogUserInOutResponse().register(envelope);
  189.  
  190. HttpTransportSE DemoHttpTransport = new HttpTransportSE(Address);
  191. DemoHttpTransport.call(params.GetSoapAction(), envelope);
  192.  
  193. LogUserInOutResponse resp = (LogUserInOutResponse)envelope.bodyIn;
  194.  
  195. return resp;
  196. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement