I dunno.  Look at the JAX-WS generated super.getPort(xxx) method and see what
it places in for the first argument for super.getPort(yyy, xxx)--in all
likelihood it calls the latter method behind-the-scenes.

Glen


jackdawson wrote:
> 
> This is what I found on a little research.
> 
> If I give port name and service endpoint interface
> eg: super.getPort(LoginService, LoginService.class); 
> then it doesn't work.
> 
> But if I use service endpoint interface as the only argument 
> eg: super.getPort(LoginService.class); 
> then it works.
> 
> I can't think of any now. Any idea -why?
> 
> Thanks.
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> jackdawson wrote:
>> 
>> I've a question which is pricking me now. I made only this change and it
>> worked absolutely fine.
>> 
>> Before the change:
>> LoginService_Service ss = new LoginService_Service(wsdlURL,
>> SERVICE_NAME);
>> LoginService port = ss.getLoginService();
>> 
>> 
>> 
>> After the change:
>> I replaced the above statements with the ones below:
>> Service jaxwsService = Service.create(wsdlURL, SERVICE_NAME);
>> LoginService port = jaxwsService.getPort(LoginService.class);
>> 
>> Can you please explain me what difference did it make?
>> Before the change always threw an exception.
>> 
>> Exception in thread "main" javax.xml.ws.WebServiceException: Port
>> {urn:login.safe.two.us}LoginService not found.
>> 
>> 
>> And, here is the implementation of getLoginService() 
>> 
>>     @WebEndpoint(name = "LoginService")
>>     public LoginService getLoginService() {
>>         return super.getPort(LoginService, LoginService.class);
>>     }
>> 
>> NOTE: LoginService_Service extends javax.xml.ws.Service
>> 
>> Thanks.
>> 
>> 
>> 
>> 
>> 
>> jackdawson wrote:
>>> 
>>> Thanks Glen. You are the ONE.
>>> The 2nd one worked for me. I didn't try the 1st one though.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> Glen Mazza wrote:
>>>> 
>>>> 1.) Absolutely--just make sure your client is using the right WSDL on
>>>> the local machine (the *Service.java JAX-WS artifact will give you the
>>>> default hardcoded filename used, or you can use specify the WSDL as
>>>> shown in the testcases in Step #1, substep #2 here: 
>>>> http://www.jroller.com/gmazza/entry/writing_junit_test_cases_for)
>>>> 
>>>> 2.)  That'll work also.  Set the ENDPOINT_ADDRESS_PROPERTY as shown in
>>>> Step #7 here:
>>>> http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1
>>>> 
>>>> The error message "Parameter XXX doesn't exist", BTW, may indicate
>>>> you're using an rpc/encoded WSDL, which not supported by CXF or
>>>> Metro--but I'm unsure here.
>>>> 
>>>> Glen
>>>> 
>>>> 
>>>> jackdawson wrote:
>>>>> 
>>>>> Hi all,
>>>>> 
>>>>> I have a WSDL which has the soap address pointed to a service in the
>>>>> production environment. I would like to create a client from this WSDL
>>>>> but I would like to use the service in the development environment and
>>>>> not in the production.
>>>>> ANd now, my questions are:
>>>>>                   1. Can I change the soap address in the WSDL to point 
>>>>> to the
>>>>> service in the development environment?
>>>>>                   2. Or, should I change the serive URL in the client 
>>>>> code after
>>>>> generating it from the WSDL?
>>>>> 
>>>>>                   If I follow step 1 then I keep getting the exception 
>>>>> whenever I
>>>>> try to vall the service: Parameter xxxxx doesn't exist.
>>>>>                   If I follow step 2 then:
>>>>>                           a.) firstly, I get the UnknownHostException
>>>>>                           b.) I couldn't find a way to change the URL in 
>>>>> the client.
>>>>>                   I know in XFire I can use this:
>>>>> org.codehaus.xfire.client.Client.getInstance(service).setUrl(service_url);
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Web-Service-URL-to-be-changed-in-the-client-tp19656864p19660859.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to