users@jax-rpc.java.net

Re: dynamic Proxy Client!

From: Anne Thomas Manes <atmanes_at_gmail.com>
Date: Thu, 10 Nov 2005 14:24:06 -0500

What is the targetNamespace of your schema in the <types> section?
Is it the same as the WSDL tagetNamespace?

The namespace in your message will be taken from the schema, not from the
WSDL.

Anne

On 11/10/05, Oancea Daniel <doancea_at_gmail.com> wrote:
>
> Thanks Anne for your reply.
>
> I think I'm using the right one! Here is another snippet from my
> description:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions
> name="MonitorSvc"
> targetNamespace="http://www.test.com/MonitorSvc.wsdl"
> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://www.test.com/MonitorSvc.wsdl"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsd1="http://www.test.com/MonitorSvc.xsd1">
> .............................................................
>
> In my client I put something like:
>
> ....................................
>
> private static String serviceName = "MonitorSvcService";
> private static String qPortName = "MonitorSvcPort";
> private static String url = "http://localhost:8081/MonitorSvc/Alarm";
> private static String uriName = "http://www.test.com/MonitorSvc.wsdl";
>
> public static void main(String[] args) {
>
> StringBuffer buffer = new StringBuffer(url);
> buffer.append("?WSDL");
>
> try {
> URL wsdlURL = new URL(buffer.toString());
> ServiceFactory factory = ServiceFactory.newInstance();
> QName qName = new QName(uriName,serviceName);
> Service service = factory.createService(wsdlURL,qName);
> MonitorSvc myproxy = (MonitorSvc)service.getPort(new
> QName(uriName,qPortName),MonitorSvc.class);
> .............................................
>
> The SEI it was generated using the -import option in wscompile tool:
> wscompile -import -d . -nd . -f:norpcstructures config-wsdl.xml
>
> Something is wrong but I can not figure what it is.
>
>
> On 11/9/05, Anne Thomas Manes <atmanes_at_gmail.com > wrote:
> >
> > Are you sure you're using the correct namespace?
> >
> > On 11/9/05, Oancea Daniel < doancea_at_gmail.com> wrote:
> > >
> > > Hi everybody,
> > >
> > > I try to develop a jax-rpc client using dynamic proxy client and I got
> > > the fallowing error:
> > >
> > > Exception in thread "main" port: {http://www.test.com/MonitorSvc.wsdl}MonitorSvcPort
> > > <http://www.test.com/MonitorSvc.wsdl%7DMonitorSvcPort> does not
> > > contain operation: raiseAlarm
> > > at com.sun.xml.rpc.client.dii.ConfiguredCall.configureCall(
> > > ConfiguredCall.java:98)
> > >
> > > .........................................................................................................................
> > >
> > > here is a snippet from my WSDL description:
> > > ................................................
> > > <wsdl:portType name="MonitorSvc">
> > > <wsdl:operation name="raiseAlarm">
> > > <wsdl:input message="tns:raiseAlarmRequest"/>
> > > <wsdl:output message="tns:raiseAlarmResponse"/>
> > > </wsdl:operation>
> > > </wsdl:portType>
> > > <wsdl:binding name="MonitorSvcBinding" type="tns:MonitorSvc">
> > > <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/
> > > <http://schemas.xmlsoap.org/soap/http%22/>>
> > > <wsdl:operation name="raiseAlarm">
> > > <soap:operation soapAction="raiseAlarm" style="document"/>
> > > <wsdl:input>
> > > <soap:body parts="raiseRequest" use="literal"/>
> > > </wsdl:input>
> > > <wsdl:output>
> > > <soap:body parts="raiseResponse" use="literal"/>
> > > </wsdl:output>
> > > </wsdl:operation>
> > > </wsdl:binding>
> > > <wsdl:service name="MonitorSvcService">
> > > <wsdl:port binding="tns:MonitorSvcBinding" name="MonitorSvcPort">
> > > <soap:address location="http://localhost:8081/MonitorSvc/Alarm"/<http://localhost:8081/MonitorSvc/Alarm%22/>
> > > >
> > > </wsdl:port>
> > > </wsdl:service>
> > >
> > > what I'm doing wrong here? (why doesn't recognize raiseAlarm
> > > operation?)
> > >
> > > Any suggestion is overcome! thanks
> > >
> >
> >
>