You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by eric dunn <er...@yahoo.com> on 2002/09/10 22:11:35 UTC

NameSpace help solved problem

Dear all,

Thanks for all the spediant help. After reading it i
just set the parameter namespaces in apache and all is
well. By the way, it generates this:

<ns1:validateLogin
xmlns:ns1="http://www.openuri.org/">
  <ns1:user xsi:type="xsd:string">sriram</ns1:user>
  <ns1:pwd xsi:type="xsd:string">somanchi</ns1:pwd>
</ns1:validateLogin>


Warmest Regards,
Eric Dunn

--- Vadim Draluk <va...@draluk.net> wrote:
> Thomas,
> 
> you are right in that namespace declaration is very
> much free-format. But as to WebLogic 6.1, it doesn't
> seem to care about it at all. The result is that I'm
> able to send messages with namespace defs designed
> for, say, WebSphere directly to WebLogic without any
> changes, for example:
> 
> <ns1:getGroupMembers
>
xmlns:ns1=\"http://tempuri.org/com.vadim.server.ejb.MyServiceInterface\"
>
xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"><p1
> xsi:type=\"xsd:string\">myGroup</p1><p2
>
xsi:type=\"xsd:string\">myUser</p2></ns1:getGroupMembers>
> 
> May be it's "p#" element names that WebLogic
> expects,
> but I'm not sure.
> 
> Cheers
> 
> Vadim
> --- thomas.cherel@ascentialsoftware.com wrote:
> > Sorry, one more try:
> > I think your problem is not exactly that one. 
> > In the following case: 
> > 
> > <ns1:validateLogin 
> > xmlns:ns1="http://www.openuri.org/
> > <http://www.openuri.org/> "> 
> > <user xsi:type="xsd:string">sriram</user> 
> > <pwd xsi:type="xsd:string">somanchi</pwd> 
> > </ns1:validateLogin> 
> > 
> > validateLogin is in the http://www.openuri.org/
> > <http://www.openuri.org/>
> > namespace, but user and pwd are in the current
> > default namespace. 
> > 
> > In the other case: 
> > 
> > <validateLogin xmlns="http://www.openuri.org/
> > <http://www.openuri.org/> "> 
> >   <user xsi:type="xsd:string">user</user> 
> >   <pwd xsi:type="xsd:string">password</pwd> 
> > </validateLogin> 
> > 
> > validateLogin uase and pwd are all in the
> > http://www.openuri.org/
> > <http://www.openuri.org/>  namespace as the
> > xmlns="http://www.openuri.org/
> > <http://www.openuri.org/> " validateLogin
> attribute
> > is specifying
> > http://www.openuri.org/ <http://www.openuri.org/> 
> > as the new default
> > namespace.
> > 
> > I will be surprised that WebLogic ignore
> completely
> > the namespace or is
> > having a problem because the namespace declaration
> > does not follow a very
> > specific pattern.
> > 
> > But I will not be surprised that the SOAP server
> is
> > having trouble if the
> > user and pwd element do not belong to the right
> > namespace (which is supposed
> > to be driven by your WSDL).
> > 
> > Thomas 
> > 
> > 
> > 
> > -----Original Message----- 
> > From: eric dunn [mailto:ericjeebusiness@yahoo.com
> > <ma...@yahoo.com> ] 
> > Sent: Tuesday, September 10, 2002 2:46 PM 
> > To: axis-user@xml.apache.org 
> > Cc: ericjeebusiness@yahoo.com 
> > Subject: NameSpace help 
> > 
> > 
> > Hello, 
> >    I do not want the ns# prefix apache axis
> creates 
> > for a namespace. Is there a way to get rid of it?
> I 
> > looked in the source and it doesn't seem likely,
> no 
> > matter how you set the namespace, deep in the code
> > it 
> > uses getPrefix to retrieve ns1. This is all
> because
> > a 
> > weblogic webservice doesn't like my prefix there. 
> > 
> > What Apache sends : 
> > ------------------------------ 
> > <ns1:validateLogin 
> > xmlns:ns1="http://www.openuri.org/
> > <http://www.openuri.org/> "> 
> > <user xsi:type="xsd:string">sriram</user> 
> > <pwd xsi:type="xsd:string">somanchi</pwd> 
> > </ns1:validateLogin> 
> > 
> > 
> > What weblogic wants : 
> > ------------------------------ 
> > <validateLogin xmlns="http://www.openuri.org/
> > <http://www.openuri.org/> "> 
> >   <user xsi:type="xsd:string">user</user> 
> >   <pwd xsi:type="xsd:string">password</pwd> 
> > </validateLogin> 
> > 
> > 
> > Is there any way to make a Message with a
> namespace 
> > without prefixes? 
> > 
> > Warmest Regards, 
> > Eric Dunn 
> > 
> > 
> > 
> > code 
> > ----------------- 
> > 
> > QName operationQN = new 
> > QName("http://www.openuri.org/
> > <http://www.openuri.org/> ",
> > "validateLogin"); 
> >                 call.setOperationName( operationQN
> > ); 
> > 
> > 
> >                call.addParameter( "user",
> > XMLType.XSD_STRING,
> > ParameterMode.IN ); 
> >                call.addParameter( "pwd",
> > XMLType.XSD_STRING, 
> > ParameterMode.IN );            
> >          call.setReturnType( XMLType.XSD_INT );   
> > 
> > return ( (Integer) call.invoke(new Object []
> > {strLoginID,strPwd} )
> > ).intValue(); 
> > 
> > 
> > 
> > 
> > __________________________________________________
> 
> > Yahoo! - We Remember 
> > 9-11: A tribute to the more than 3,000 lives lost
> > http://dir.remember.yahoo.com/tribute
> > <http://dir.remember.yahoo.com/tribute>  
> > 
> > 
> 


__________________________________________________
Yahoo! - We Remember
9-11: A tribute to the more than 3,000 lives lost
http://dir.remember.yahoo.com/tribute