Создал Web сервис в 1С.
При обращении из внешней системы (oracle, с использованием пакета utl_dbws), получаю ошибку:
ORA-29532: Java call terminated by uncaught Java exception: javax.xml.rpc.soap.SOAPFaultException: Ошибка разбора SOAP сообщения: неизвестный параметр.
если идти по ссылки http://10.184.0.16/service/ws/clients.1cws?wsdl
то получаем:
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.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap12bind="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:soapbind="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.spr.org"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsd1="http://www.spr.org"
name="Clients"
targetNamespace="http://www.spr.org">
<types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xs1="http://www.spr.org"
targetNamespace="http://www.spr.org"
attributeFormDefault="unqualified"
elementFormDefault="qualified">
<xs:complexType name="Client">
<xs:sequence>
<xs:element name="id"
type="xs:string"/>
<xs:element name="Name"
type="xs:string"/>
<xs:element name="inn"
type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ListClient">
<xs:sequence>
<xs:element name="Client"
type="tns:Client"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:element name="GetListClient">
<xs:complexType>
<xs:sequence>
<xs:element name="Param"
type="xs:string"
nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetListClientResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return"
type="tns:ListClient"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<message name="GetListClientRequestMessage">
<part name="parameters"
element="tns:GetListClient"/>
</message>
<message name="GetListClientResponseMessage">
<part name="parameters"
element="tns:GetListClientResponse"/>
</message>
<portType name="ClientsPortType">
<operation name="GetListClient">
<input message="tns:GetListClientRequestMessage"/>
<output message="tns:GetListClientResponseMessage"/>
</operation>
</portType>
<binding name="ClientsSoapBinding"
type="tns:ClientsPortType">
<soapbind:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetListClient">
<soapbind:operation style="document"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
</binding>
<binding name="ClientsSoap12Binding"
type="tns:ClientsPortType">
<soap12bind:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="GetListClient">
<soap12bind:operation style="document"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
</binding>
<service name="Clients">
<port name="ClientsSoap"
binding="tns:ClientsSoapBinding">
<documentation>
<wsi:Claim xmlns:wsi="http://ws-i.org/schemas/conformanceClaim/"
conformsTo="http://ws-i.org/profiles/basic/1.1"/>
</documentation>
<soapbind:address location="http://10.184.0.16/service/ws/clients.1cws"/>
</port>
<port name="ClientsSoap12"
binding="tns:ClientsSoap12Binding">
<soap12bind:address location="http://10.184.0.16/service/ws/clients.1cws"/>
</port>
</service>
</definitions>
если смотреть HTTP пакеты то вот что отсылает оракл на веб сервис 1с:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
<?xml
version="1.0"
encoding="UTF-8"
?>
<env:Envelope>
xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<env:Body>
<tns:GetListClient>
xmlns:tns="http://www.spr.org"
hello
</tns:GetListClient>
</env:Body>
</env:Envelope>
Вот ответ:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
<soap:Envelope>
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<soap:Header/>
<soap:Body>
<soap:Fault>
<faultcode>
soap:Client
</faultcode>
<faultstring>
[truncated] \ 320 \ 236 \ 321 \ 210 \ 320 \ 270 \ 320 \ 261 \ 320 \ 272 \ 320 \ 260 \ 321 \ 200 \ 320 \ 260 \ 320 \ 267 \ 320 \ 261 \ 320 \ 276 \ 321 \ 200 \ 320 \ 260 SOAP \ 321 \ 201 \ 320 \ 276 \ 320 \ 276 \ 320 \ 261 \ 321 \ 211 \ 320 \ 265 \ 320 \ 275 \ 320 \ 270 \ 321 \ 217 : \ 320 \ 275 \ 320 \ 265 \ 320 \ 270 \ 320 \ 267 \ 320 \ 262 \ 3
</faultstring>
<detail>
[truncated] \ 320 \ 236 \ 321 \ 210 \ 320 \ 270 \ 320 \ 261 \ 320 \ 272 \ 320 \ 260 \ 321 \ 200 \ 320 \ 260 \ 320 \ 267 \ 320 \ 261 \ 320 \ 276 \ 321 \ 200 \ 320 \ 260 SOAP \ 321 \ 201 \ 320 \ 276 \ 320 \ 276 \ 320 \ 261 \ 321 \ 211 \ 320 \ 265 \ 320 \ 275 \ 320 \ 270 \ 321 \ 217 : \ 320 \ 275 \ 320 \ 265 \ 320 \ 270 \ 320 \ 267 \ 320 \ 262 \ 3
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
Если вызывать этот веб сервис из 1с то все получаем нормально.
Вот запрос:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
<soap:Envelope>
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<soap:Header/>
<soap:Body>
<m:GetListClient>
xmlns:m="http://www.spr.org"
<m:Param/>
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
</m:GetListClient>
</soap:Body>
</soap: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.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
<soap:Envelope>
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
<soap:Header/>
<soap:Body>
<m:GetListClientResponse>
xmlns:m="http://www.spr.org"
<m:return>
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<m:Client>
<m:id>
000000001
</m:id>
<m:Name>
\ 320 \ 230 \ 320 \ 262 \ 320 \ 260 \ 320 \ 275 \ 320 \ 276 \ 320 \ 262
</m:Name>
<m:inn>
2493498739
</m:inn>
</m:Client>
<m:Client>
<m:id>
000000002
</m:id>
<m:Name>
\ 320 \ 230 \ 320 \ 237 \ 320 \ 237 \ 321 \ 203 \ 320 \ 277 \ 320 \ 272 \ 320 \ 270 \ 320 \ 275
</m:Name>
<m:inn>
2984739587
</m:inn>
</m:Client>
<m:Client>
<m:id>
000000003
</m:id>
<m:Name>
\ 320 \ 236 \ 320 \ 236 \ 320 \ 236 \ 320 \ 240 \ 320 \ 276 \ 320 \ 263 \ 320 \ 260 \ 320 \ 270 \ 320 \ 272 \ 320 \ 276 \ 320 \ 277 \ 321 \ 213 \ 321 \ 202 \ 320 \ 260
</m:Name>
<m:inn>
5462626246
</m:inn>
</m:Client>
</m:return>
</m:GetListClientResponse>
</soap:Body>
</soap:Envelope>
Так и не пойму куда копать.... Возможно у оракла и 1с разное понятие про веб сервисы.