2011-11-04 9 views
7

यह एक JAX-WS डबल्यूएसडीएल में स्थान (schemaLocation और soap:addresslocation) कॉन्फ़िगर करने के लिए संभव है?
जब मैं नीचे नमूना तैनात करता हूं, 'servername' लोकलहोस्ट होगा और 'सर्वरपोर्ट' वेब एप्लिकेशन के लिए स्थानीय पोर्ट नंबर होगा।schemaLocation और साबुन बदलें: क्रम में पता स्थान JAX-WS साथ डबल्यूएसडीएल उत्पन्न

हालांकि, मैं इन्हें प्रॉक्सी सेरनावैम और सर्वरपोर्ट के रूप में पुन: कॉन्फ़िगर करना चाहता हूं जो सेवा पर रीडायरेक्ट करता है। क्या यह संभव है और मैं इसे कैसे प्राप्त करूं?

तैनाती पर्यावरण टोमकैट और अपाचे है।

@WebService 
public class AuthenticationService { 
.... 
public AuthenticationService(){} 

@WebMethod 
    public AuthenticationResult checkAuthentication(
     @WebParam(name = "authentication") Authentication authentication, 
     @WebParam(name = "privilege") Privilege privilege) { 
    .... 
} 
} 

जब भाग गया, डबल्यूएसडीएल इस तरह दिखता है:

<definitions targetNamespace="http://authentication.service.ws.ijs/" name="AuthenticationServiceService"> 
<types> 

    <xsd:schema> 
     <xsd:import namespace="http://authentication.service.ws.ijs/" schemaLocation="http://servername:serverport/WebAppName/AuthenticationService?xsd=1"/> 
    </xsd:schema> 
</types> 

<message name="checkAuthentication"> 
    <part name="parameters" element="tns:checkAuthentication"/> 
</message> 

<message name="checkAuthenticationResponse"> 
    <part name="parameters" element="tns:checkAuthenticationResponse"/> 
</message> 

<portType name="AuthenticationService"> 

    <operation name="checkAuthentication"> 
     <input wsam:Action="http://authentication.service.ws.ijs/AuthenticationService/checkAuthenticationRequest" message="tns:checkAuthentication"/> 
     <output wsam:Action="http://authentication.service.ws.ijs/AuthenticationService/checkAuthenticationResponse" message="tns:checkAuthenticationResponse"/> 
    </operation> 

</portType> 

<binding name="AuthenticationServicePortBinding" type="tns:AuthenticationService"> 
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> 

    <operation name="checkAuthentication"> 
     <soap:operation soapAction=""/> 

     <input> 
      <soap:body use="literal"/> 
     </input> 

     <output> 
      <soap:body use="literal"/> 
     </output> 
    </operation> 

</binding> 

<service name="AuthenticationServiceService"> 

    <port name="AuthenticationServicePort" binding="tns:AuthenticationServicePortBinding"> 
     <soap:address location="http://servername:serverport/WebAppName/AuthenticationService"/> 
    </port> 
</service> 
</definitions> 

किसी भी मदद की बहुत सराहना की जाएगी

मैं निम्न सेवा वर्ग की है।

+0

एंडपॉइंट को ओवरराइड करने के लिए, http://stackoverflow.com/questions/2490737/how-to-change-webservice-url-endpoint – prunge

उत्तर

7

आप अपने अनुरोध में मूल होस्ट नाम रखें (उदाहरण, ProxyPreserveHost On उपयोग करें यदि आप mod_proxy का उपयोग करें) इस, आपके URL ठीक करना चाहिए अगर आप एक ही प्रोटोकॉल का उपयोग करें। यदि आपकी प्रॉक्सी https और http के बीच स्विच करती है तो आपको अभी भी समस्याएं हो सकती हैं।

+1

https और http के बीच स्विच HTTP वातावरण पैरामीटर X सेट करके प्रबंधित कुछ वातावरण में हो सकता है प्रॉक्सी पर फॉरवर्ड-प्रोटो। – Drunix

संबंधित मुद्दे