День добрый!
Коллеги, вопрос наверное элементарный, но я буду благодарен за помощь...
три дня уже потерял :-(
При попытке выполнить SOAP запрос в ниже приведенном примере
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
package example;
import appointment.CreateAppointment;
import javax.xml.ws.BindingProvider;
import java.util.Map;
public class HelloWorldClient {
public static void main(String[] argv) {
appointment.CreateAppointment createAppointment = new CreateAppointment();
appointment.CreateAppointmentPortType service = createAppointment.getCreateAppointmentSoap();
//invoke business method
Map requestContext = ((BindingProvider)service).getRequestContext();
requestContext.put(BindingProvider.USERNAME_PROPERTY, "ws");
requestContext.put(BindingProvider.PASSWORD_PROPERTY, "1");
service.getFreeTimeSlots("2012-12-17", "10");
}
}
вываливается ошибка
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
Exception in thread "main" javax.xml.ws.WebServiceException: class appointment.CreateDoc do not have a property of the name {WWW}guid_service
at com.sun.xml.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:188)
at com.sun.xml.ws.client.sei.SyncMethodHandler.<init>(SyncMethodHandler.java:116)
at com.sun.xml.ws.client.sei.SEIStub.<init>(SEIStub.java:67)
at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:540)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:288)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:270)
at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:263)
at javax.xml.ws.Service.getPort(Service.java:134)
at appointment.CreateAppointment.getCreateAppointmentSoap(CreateAppointment.java:62)
at example.HelloWorldClient.main(HelloWorldClient.java:18)
Caused by: javax.xml.bind.JAXBException: {WWW}guid_service is not a valid property on class appointment.CreateDoc
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getElementPropertyAccessor(JAXBContextImpl.java:893)
at com.sun.xml.ws.client.sei.BodyBuilder$DocLit.<init>(BodyBuilder.java:185)
... 9 more
Код создан с использованием библиотеки JAX-WS RI.
This class was generated: 2.2 enerated by the JAX-WS RI 2.2.7-b01 Generated source version: 2.2
AdditionalServices.java
CreateAppointment.java
CreateAppointment.wsdl
CreateAppointmentPortType.java
CreateDoc.java
CreateDocResponse.java
CreateRequest.java
CreateRequestResponse.java
GetFreeTimeSlots.java
GetFreeTimeSlots1.java
GetFreeTimeSlots1Response.java
GetFreeTimeSlotsResponse.java
ObjectFactory.java
package-info.java
PrimaryServices.java
TimeSlots.java
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.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
<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="WWW" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.ultramed55.ru/ws2" xmlns:xsd2="WWW" xmlns:xsd3="http://www.ultramed55.ru/ws" name="CreateAppointment" targetNamespace="WWW">
<types>
<xs:schema xmlns:tns="http://www.ultramed55.ru/ws" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ultramed55.ru/ws" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:complexType name="additional_services">
<xs:sequence>
<xs:element name="id_service" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:simpleType name="guid_service">
<xs:list itemType="xs:string"/>
</xs:simpleType>
<xs:complexType name="primary_services">
<xs:sequence>
<xs:element name="id_service" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:tns="http://www.ultramed55.ru/ws2" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ultramed55.ru/ws2" attributeFormDefault="unqualified" elementFormDefault="qualified">
<xs:complexType name="TimeSlots">
<xs:sequence>
<xs:element name="TimeSlot" type="xs:string" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs1="http://www.ultramed55.ru/ws" xmlns:xs2="http://www.ultramed55.ru/ws2" xmlns:xs3="WWW" targetNamespace="WWW" elementFormDefault="qualified">
<xs:import namespace="http://www.ultramed55.ru/ws"/>
<xs:import namespace="http://www.ultramed55.ru/ws2"/>
<xs:element name="CreateDoc">
<xs:complexType>
<xs:sequence>
<xs:element name="guid_service" type="xs1:guid_service"/>
<xs:element name="primary_services" type="xs1:primary_services"/>
<xs:element name="additional_services" type="xs1:additional_services" nillable="true"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CreateDocResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetFreeTimeSlots">
<xs:complexType>
<xs:sequence>
<xs:element name="date" type="xs:string"/>
<xs:element name="Doctor1cID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetFreeTimeSlotsResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CreateRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="surname" type="xs:string"/>
<xs:element name="name" type="xs:string"/>
<xs:element name="patronymic" type="xs:string"/>
<xs:element name="DOT" type="xs:string"/>
<xs:element name="time" type="xs:string"/>
<xs:element name="date" type="xs:string"/>
<xs:element name="docter1cID" type="xs:string"/>
<xs:element name="telephone" type="xs:string"/>
<xs:element name="service1cID" type="xs:string"/>
<xs:element name="firstVisit" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="CreateRequestResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetFreeTimeSlots1">
<xs:complexType>
<xs:sequence>
<xs:element name="date" type="xs:string"/>
<xs:element name="Doctor1cID" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="GetFreeTimeSlots1Response">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs2:TimeSlots"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</types>
<message name="CreateDocRequestMessage">
<part name="parameters" element="tns:CreateDoc"/>
</message>
<message name="CreateDocResponseMessage">
<part name="parameters" element="tns:CreateDocResponse"/>
</message>
<message name="GetFreeTimeSlotsRequestMessage">
<part name="parameters" element="tns:GetFreeTimeSlots"/>
</message>
<message name="GetFreeTimeSlotsResponseMessage">
<part name="parameters" element="tns:GetFreeTimeSlotsResponse"/>
</message>
<message name="CreateRequestRequestMessage">
<part name="parameters" element="tns:CreateRequest"/>
</message>
<message name="CreateRequestResponseMessage">
<part name="parameters" element="tns:CreateRequestResponse"/>
</message>
<message name="GetFreeTimeSlots1RequestMessage">
<part name="parameters" element="tns:GetFreeTimeSlots1"/>
</message>
<message name="GetFreeTimeSlots1ResponseMessage">
<part name="parameters" element="tns:GetFreeTimeSlots1Response"/>
</message>
<portType name="CreateAppointmentPortType">
<operation name="CreateDoc">
<input message="tns:CreateDocRequestMessage"/>
<output message="tns:CreateDocResponseMessage"/>
</operation>
<operation name="GetFreeTimeSlots">
<input message="tns:GetFreeTimeSlotsRequestMessage"/>
<output message="tns:GetFreeTimeSlotsResponseMessage"/>
</operation>
<operation name="CreateRequest">
<input message="tns:CreateRequestRequestMessage"/>
<output message="tns:CreateRequestResponseMessage"/>
</operation>
<operation name="GetFreeTimeSlots1">
<input message="tns:GetFreeTimeSlots1RequestMessage"/>
<output message="tns:GetFreeTimeSlots1ResponseMessage"/>
</operation>
</portType>
<binding name="CreateAppointmentSoapBinding" type="tns:CreateAppointmentPortType">
<soapbind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="CreateDoc">
<soapbind:operation style="document" soapAction="WWW#CreateAppointment:CreateDoc"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetFreeTimeSlots">
<soapbind:operation style="document" soapAction="WWW#CreateAppointment:GetFreeTimeSlots"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="CreateRequest">
<soapbind:operation style="document" soapAction="WWW#CreateAppointment:CreateRequest"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
<operation name="GetFreeTimeSlots1">
<soapbind:operation style="document" soapAction="WWW#CreateAppointment:GetFreeTimeSlots1"/>
<input>
<soapbind:body use="literal"/>
</input>
<output>
<soapbind:body use="literal"/>
</output>
</operation>
</binding>
<binding name="CreateAppointmentSoap12Binding" type="tns:CreateAppointmentPortType">
<soap12bind:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="CreateDoc">
<soap12bind:operation style="document" soapAction="WWW#CreateAppointment:CreateDoc"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetFreeTimeSlots">
<soap12bind:operation style="document" soapAction="WWW#CreateAppointment:GetFreeTimeSlots"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="CreateRequest">
<soap12bind:operation style="document" soapAction="WWW#CreateAppointment:CreateRequest"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
<operation name="GetFreeTimeSlots1">
<soap12bind:operation style="document" soapAction="WWW#CreateAppointment:GetFreeTimeSlots1"/>
<input>
<soap12bind:body use="literal"/>
</input>
<output>
<soap12bind:body use="literal"/>
</output>
</operation>
</binding>
<service name="CreateAppointment">
<port name="CreateAppointmentSoap" binding="tns:CreateAppointmentSoapBinding">
<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://develop-srv:8080/UM/ws/CreateAppointment.1cws"/>
</port>
<port name="CreateAppointmentSoap12" binding="tns:CreateAppointmentSoap12Binding">
<soap12bind:address location="http://develop-srv:8080/UM/ws/CreateAppointment.1cws"/>
</port>
</service>
</definitions>