Hi There,
After following
http://static.springframework.org/sp.../tutorial.html
and
http://static.springframework.org/sp...tutorial2.html
I managed to get http://localhost:8080/holidayService/holiday.wsdl generated. But inside the binding, soapAction=""
Code:
<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions xmlns:schema="http://mycompany.com/hr/schemas" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://mycompany.com/hr/definitions" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://mycompany.com/hr/definitions">
- <wsdl:types>
- <xs:schema xmlns:hr="http://mycompany.com/hr/schemas" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://mycompany.com/hr/schemas">
- <xs:element name="HolidayRequest">
- <xs:complexType>
- <xs:all>
<xs:element name="Holiday" type="hr:HolidayType" />
<xs:element name="Employee" type="hr:EmployeeType" />
</xs:all>
</xs:complexType>
</xs:element>
- <xs:complexType name="HolidayType">
- <xs:sequence>
<xs:element name="StartDate" type="xs:date" />
<xs:element name="EndDate" type="xs:date" />
</xs:sequence>
</xs:complexType>
- <xs:complexType name="EmployeeType">
- <xs:sequence>
<xs:element name="Number" type="xs:integer" />
<xs:element name="FirstName" type="xs:string" />
<xs:element name="LastName" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
- <wsdl:message name="HolidayRequest">
<wsdl:part element="schema:HolidayRequest" name="HolidayRequest" />
</wsdl:message>
- <wsdl:portType name="HumanResource">
- <wsdl:operation name="Holiday">
<wsdl:input message="tns:HolidayRequest" name="HolidayRequest" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="HumanResourceBinding" type="tns:HumanResource">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="Holiday">
<soap:operation soapAction="" /> - <wsdl:input name="HolidayRequest">
<soap:body use="literal" />
</wsdl:input>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="HumanResourceService">
- <wsdl:port binding="tns:HumanResourceBinding" name="HumanResourcePort">
<soap:address location="http://localhost:8080/holidayService/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Here is the hr.xsd
Code:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:hr="http://mycompany.com/hr/schemas"
elementFormDefault="qualified"
targetNamespace="http://mycompany.com/hr/schemas">
<xs:element name="HolidayRequest">
<xs:complexType>
<xs:all>
<xs:element name="Holiday" type="hr:HolidayType"/>
<xs:element name="Employee" type="hr:EmployeeType"/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:complexType name="HolidayType">
<xs:sequence>
<xs:element name="StartDate" type="xs:date"/>
<xs:element name="EndDate" type="xs:date"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EmployeeType">
<xs:sequence>
<xs:element name="Number" type="xs:integer"/>
<xs:element name="FirstName" type="xs:string"/>
<xs:element name="LastName" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Here is the servlet xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
<bean id="hrService" class="com.mycompany.hr.service.HumanResourceService"/>
<bean id="holidayEndpoint" class="com.mycompany.hr.ws.HolidayEndpoint" init-method="init">
<constructor-arg ref="hrService"/>
</bean>
<bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
<property name="mappings">
<props>
<prop key="{http://mycompany.com/hr/schemas}HolidayRequest">holidayEndpoint</prop>
</props>
</property>
<property name="interceptors">
<bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
</property>
</bean>
<bean id="holiday" class="org.springframework.ws.wsdl.wsdl11.DynamicWsdl11Definition">
<property name="builder">
<bean class="org.springframework.ws.wsdl.wsdl11.builder.XsdBasedSoap11Wsdl4jDefinitionBuilder">
<property name="schema" value="/WEB-INF/hr.xsd"/>
<property name="portTypeName" value="HumanResource"/>
<property name="locationUri" value="http://localhost:8080/holidayService/"/>
<property name="targetNamespace" value="http://mycompany.com/hr/definitions"/>
</bean>
</property>
</bean>
</beans>
Any idea what could be missed?
Thanks