You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Qi An (JIRA)" <ji...@apache.org> on 2006/05/17 21:07:06 UTC

[jira] Created: (AXIS2-747) Missing namespace on subelement

 Missing namespace on subelement
--------------------------------

         Key: AXIS2-747
         URL: http://issues.apache.org/jira/browse/AXIS2-747
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: om  
    Versions: 1.0    
 Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
    Reporter: Qi An
    Priority: Critical


The below all worked fine on 0.95:

The complex type in question is defined in the wsdl as:


<s:complexType name="Credential">
  <s:sequence/>
  </s:complexType>

 <s:complexType name="EnterpriseCredential"> <s:complexContent>
  <s:extension base="s0:Credential">
     <s:sequence/>
     <s:attribute name="Login" type="s:string" use="required"/>
     <s:attribute name="Password" type="s:string" use="optional"/>
     <s:attribute name="Locale" type="s:string" use="optional"/>
     <s:attribute name="TimeZone" type="s:string" use="optional"/>
     <s:attribute name="Domain" type="s:string" use="optional"/>
     <s:attribute name="AuthType" type="s:string" use="optional"/>
  </s:extension>
 </s:complexContent>
</s:complexType>


In the provider's skeleton, we have the following:

    public com.businessobjects.dsws.session.LoginResponseDocument login(
        com.businessobjects.dsws.session.LoginDocument param12)
        throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
	Login obj = param12.getLogin();
	Credential cred = obj.getCredential();

The problem is, on the getCredential() call, we actually get back an 
object of type Credential (base class) when the method was invoked with 
an enterprise credential.  So that further on, on the line:

EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;

We get a class cast exception.

Tracing through a bit with the SOAPMonitor, we noticed that the xml 
envelope actually ends up looking like:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
<login xmlns="session.dsws.businessobjects.com">
<credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
Login="administrator" />
</login>
</soapenv:Body>
</soapenv:Envelope>

Where the namespace definition of "ses" is clearly missing.  If you 
trace through the deserialization code a bit, this is why the object 
comes back as the base class instead of the extended type.

Once thing interesting one of our developer's noticed, is that if, on 
the consumer side, you add the lines:

            XmlOptions op1 = new XmlOptions();
            op1.setSaveNamespacesFirst();
            m_credential =
EnterpriseCredential.Factory.newInstance(op1);

At the time you create the credential, it seems that *some of the time* 
this fixes the problem, so that the xml appears as:

<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope
 xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header />
<soapenv:Body>
 <login xmlns="session.dsws.businessobjects.com">
 <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xmlns:ses="session.dsws.businessobjects.com" Password=""
 Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
  Login="administrator" />
 </login>
 </soapenv:Body>
</soapenv:Envelope>

But only some of the time.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Vinh Tran (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12422260 ] 
            
Vinh Tran commented on AXIS2-747:
---------------------------------

Here is some more information to help resolve this issue....

I ran into the same problem with the missing namespace on instance types. 

Here is the client code that invokes the service:

                SFPServiceWSStub service = new SFPServiceWSStub(plugin.getUrl());
                PluginEventSynchDocument synchDoc = PluginEventSynchDocument.Factory.newInstance();
               
                TranslationCompleteEventType eventType = TranslationCompleteEventType.Factory.newInstance();
                eventType.setCallSide(event.getCallSide().getValue().intValue());
                eventType.setPluginId(event.getPluginId());
                eventType.setSarId(event.getSarId());
               
                synchDoc.setPluginEventSynch(eventType);
                directiveDoc = service.handleEvent(synchDoc); 

Here is the soap message on the wire:

   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header />
      <soapenv:Body>
         <PluginEventSynch xmlns="http://www.bluenotenetworks.com/schema/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.w3.org/2001/XMLSchema-instance" ns0:type="typ:TranslationCompleteEventType">
            <sarId>0</sarId>
            <pluginId>0</pluginId>
            <callSide>1</callSide>
         </PluginEventSynch>
      </soapenv:Body>
   </soapenv:Envelope>

You can see there is no xmlns:typ namespace declaration for the typ prefix. Oddly enough everything works when stepping through the debugger. This works only when stepping through the operation within the generated stub where the SOAPEnvelope is being created. Below is a slimmed down version of our wsdl.

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="SFPService"
	targetNamespace="http://www.bnn.com/SFPService"
	xmlns:tns="http://www.bnn.com/SFPService"
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	xmlns:impl="http://www.bnn.com/schema/types">

  <wsdl:types>
    <xsd:schema 
    targetNamespace="http://www.bnn.com/schema/types"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	  xmlns:impl="http://www.bnn.com/schema/types"
    elementFormDefault="qualified">


      <xsd:element name="AllowSessionDirective" type="impl:AllowSessionDirectiveType"/>
      <xsd:complexType name="AllowSessionDirectiveType">
        <xsd:complexContent>
          <xsd:extension base="impl:TerminatingDirectiveType">
            <xsd:sequence>
            </xsd:sequence>
          </xsd:extension>
        </xsd:complexContent>
      </xsd:complexType>


      <xsd:element name="PluginDirective" type="impl:PluginDirectiveType"/>
      <xsd:complexType name="PluginDirectiveType">
        <xsd:sequence>
        </xsd:sequence>
      </xsd:complexType>
      

      <xsd:element name="IncomingCallEvent" type="impl:IncomingCallEventType"/>
      <xsd:complexType name="IncomingCallEventType">
        <xsd:complexContent>
          <xsd:extension base="impl:PluginEventType">
            <xsd:sequence>
              <xsd:element name="toDisplayName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
              <xsd:element name="toUserName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
              <xsd:element name="toHost" type="xsd:string" minOccurs="1" maxOccurs="1"/>
              <xsd:element name="fromDisplayName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
              <xsd:element name="fromUserName" type="xsd:string" minOccurs="1" maxOccurs="1"/>
              <xsd:element name="fromHost" type="xsd:string" minOccurs="1" maxOccurs="1"/>
            </xsd:sequence>
          </xsd:extension>
        </xsd:complexContent>
      </xsd:complexType>


      <xsd:element name="TerminatingDirective" type="impl:TerminatingDirectiveType"/>
      <xsd:complexType name="TerminatingDirectiveType">
        <xsd:complexContent>
          <xsd:extension base="impl:PluginDirectiveType">
            <xsd:sequence>
            </xsd:sequence>
          </xsd:extension>
        </xsd:complexContent>
      </xsd:complexType>


      <xsd:element name="PluginEvent" type="impl:PluginEventType"/>
      <xsd:complexType name="PluginEventType">
        <xsd:sequence>
          <xsd:element name="sarId" type="xsd:long" minOccurs="1" maxOccurs="1"/>
          <xsd:element name="pluginId" type="xsd:long" minOccurs="1" maxOccurs="1"/>
          <xsd:element name="callSide" type="impl:ServiceProcessingSideType" minOccurs="1" maxOccurs="1"/>
        </xsd:sequence>
      </xsd:complexType>


      <xsd:element name="ServiceProcessingSide" type="impl:ServiceProcessingSideType"/>
      <xsd:simpleType name="ServiceProcessingSideType">
        <xsd:annotation>
          <xsd:documentation>
            <enumeration>
              <enum>a=0</enum>
              <enum>b=1</enum>
              <enum>both=2</enum>
              <enum>neither=3</enum>
            </enumeration>
          </xsd:documentation>
        </xsd:annotation>
        <xsd:restriction base="xsd:int">
          <xsd:enumeration value="0"/>
          <xsd:enumeration value="1"/>
          <xsd:enumeration value="2"/>
          <xsd:enumeration value="3"/>
        </xsd:restriction>
      </xsd:simpleType>
      

      <xsd:element name="PluginEventSynch" type="impl:PluginEventType"/>
      <xsd:element name="PluginEventOneWay" type="impl:PluginEventType"/>

      <xsd:element name="ArrayOfPluginDirective" type="impl:ArrayOfPluginDirectiveType"/>
      <xsd:complexType name="ArrayOfPluginDirectiveType">
        <xsd:sequence>
          <xsd:element name="directives" type="impl:PluginDirectiveType" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
        </xsd:sequence>
      </xsd:complexType>

    </xsd:schema>
  </wsdl:types>

  <wsdl:message name="Event">
    <wsdl:part element="impl:PluginEventSynch"
			name="event" />
  </wsdl:message>

  <wsdl:message name="EventNotification">
    <wsdl:part element="impl:PluginEventOneWay"
			name="event" />
  </wsdl:message>

  <wsdl:message name="EventResponse">
    <wsdl:part element="impl:ArrayOfPluginDirective"
			name="directives" />
  </wsdl:message>

  <wsdl:portType name="SFPService">
    <wsdl:operation name="handleEvent">
      <wsdl:input message="tns:Event" />
      <wsdl:output message="tns:EventResponse" />
    </wsdl:operation>
    <wsdl:operation name="handleEventNotification">
      <wsdl:input message="tns:EventNotification" />
    </wsdl:operation>
  </wsdl:portType>

  <wsdl:binding name="SFPServiceSOAP"
		type="tns:SFPService">
    <soap:binding style="document"
			transport="http://schemas.xmlsoap.org/soap/http" />

    <wsdl:operation name="handleEvent">
      <soap:operation
				soapAction="http://www.bnn.com/SFPService/SFPServiceSOAP/handleEvent" />
      <wsdl:input>
        <soap:body use="literal"/>
      </wsdl:input>
      <wsdl:output>
        <soap:body use="literal" />
      </wsdl:output>
    </wsdl:operation>

    <wsdl:operation name="handleEventNotification">
      <soap:operation
	soapAction="http://www.bnn.com/SFPService/SFPServiceSOAP/handleEventNotification" />
      <wsdl:input>
        <soap:body use="literal" />
      </wsdl:input>
    </wsdl:operation>
  </wsdl:binding>

  <wsdl:service name="SFPServiceWS">
    <wsdl:port binding="tns:SFPServiceSOAP"
			name="SFPServiceSOAP">
      <soap:address location="http://localhost:8080/ws-sfp/SFPServiceWS" />
    </wsdl:port>
  </wsdl:service>

</wsdl:definitions>


>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Critical
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-747) Missing namespace on subelement

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-747?page=all ]

Deepal Jayasinghe reassigned AXIS2-747:
---------------------------------------

    Assign To: Ajith Harshana Ranabahu

>  Missing namespace on subelement
> --------------------------------
>
>          Key: AXIS2-747
>          URL: http://issues.apache.org/jira/browse/AXIS2-747
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Versions: 1.0
>  Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>     Reporter: Qi An
>     Assignee: Ajith Harshana Ranabahu
>     Priority: Critical

>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Dave MacLean (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12434312 ] 
            
Dave MacLean commented on AXIS2-747:
------------------------------------

I will test one of the nightly builds, but unless someone has checked in a fix, this would still be broken.  It was broken as of a week or two ago when I last tried.  Can you not reproduce it?

>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Blocker
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12438112 ] 
            
Davanum Srinivas commented on AXIS2-747:
----------------------------------------

I used the wsdl from vinh here:
http://issues.apache.org/jira/browse/AXIS2-747#action_12422260

With the following client:

import com.bnn.www.schema.types.PluginEventSynchDocument;
import com.bnn.www.schema.types.ArrayOfPluginDirectiveDocument;
import com.bnn.www.schema.types.IncomingCallEventType;
import com.bnn.www.sfpservice.SFPServiceWSStub;

public class Main {
    public static void main(String[] args) throws Exception {
        SFPServiceWSStub service = new SFPServiceWSStub();
         PluginEventSynchDocument synchDoc = PluginEventSynchDocument.Factory.newInstance();

         IncomingCallEventType eventType = IncomingCallEventType.Factory.newInstance();
         eventType.setCallSide(2);
         eventType.setPluginId(234);
         eventType.setSarId(456);

         synchDoc.setPluginEventSynch(eventType);
         ArrayOfPluginDirectiveDocument directiveDoc = service.handleEvent(synchDoc);
    }
}

and got this soap request:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
	<soapenv:Header/>
	<soapenv:Body>
		<PluginEventSynch xmlns:typ="http://www.bnn.com/schema/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.bnn.com/schema/types" xsi:type="typ:IncomingCallEventType">
			<sarId>456</sarId>
			<pluginId>234</pluginId>
			<callSide>2</callSide>
		</PluginEventSynch>
	</soapenv:Body>
</soapenv:Envelope>

I can see the xmlns:typ declaration correctly. So looks like the updates to the latest xmlbeans, woodstax parser and changes to Axis2 itself is holding up and got rid of this problem. 

thanks,
dims


>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Blocker
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Updated: (AXIS2-747) Missing namespace on subelement

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-747?page=all ]

Davanum Srinivas updated AXIS2-747:
-----------------------------------

    Priority: Blocker  (was: Critical)

>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Blocker
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Royston Shufflebotham (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12428107 ] 
            
Royston Shufflebotham commented on AXIS2-747:
---------------------------------------------

I've just been tracing this through, and it *seems* to be the Jsr173 XMLStreamReader wrapper that's going wrong.  Either that, or it's doing the right thing and there's some other way to get the namespace info out.  It's certainly not exposing the subtype namespace prefix declaration as a first class attribute.

Inside the MessageReceiverInOut.toEnvelope() method, calling dump() on the DocumentStub seems to give the correct response: the subtype namespace declaration attribute does appear.

However, when stepping through, calling next() on the XMLStreamReader, the xmlns attribute is being skipped. This seems to be happening in Jsr173.java file in XMLBeans, where its getAttributeCount()/toAttr() methods examine each attribute to see if it is a "normal" attribute. Normal is defined as being at least a non-xmlns attribute.

So it looks to me like xmlns attributes are being stripped out by the Stax wrapper of XMLBeans.

As I said, I'm not sure if this is correct behaviour, but certainly that's the behaviour I'm seeing.




>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Critical
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12422355 ] 
            
Ajith Harshana Ranabahu commented on AXIS2-747:
-----------------------------------------------

What all this tells me is that this could be a possible bug in Axiom. The reason why it suceeds after an env.toString() or during a debug session is that the OM structure gets built completely and a different serializer machanism is used when the structure is built


>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Critical
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12414365 ] 

Ajith Harshana Ranabahu commented on AXIS2-747:
-----------------------------------------------

Hmm... this seems to be an XMLBeans issue to me. We rely on the XMLStreamReader returned from the XMLBeans object and if it pumps out the correct namespace event then AXIOM should be serializing it.

I can suggest a small workaround but it will be very specific to you but you can anyway try it out.
The FromOM method it takes an externalnamespace map. What you have to do is to add the required namespace declaration to this map.
Inside  the relevant method add this piece of code just after the 
"_returnEnv = _returnMessageContext.getEnvelope();"

 java.util.Map externalNsMap = getEnvelopeNamespaces(_returnEnv);
externalNsMap.put("ses","session.dsws.businessobjects.com");

and then replace the getEnvelopeNamespaces(_returnEnv) part in the fromOm method call to externalNsMap.

I'll also look into this and will query the XMLbeans people if required 

>  Missing namespace on subelement
> --------------------------------
>
>          Key: AXIS2-747
>          URL: http://issues.apache.org/jira/browse/AXIS2-747
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Versions: 1.0
>  Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>     Reporter: Qi An
>     Assignee: Ajith Harshana Ranabahu
>     Priority: Critical

>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Dave MacLean (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12416389 ] 

Dave MacLean commented on AXIS2-747:
------------------------------------

Something to add...if in the Axis2 source code for the MessageContext class, you can add a line to setEnvelope that seems to fix this problem:

    public void setEnvelope(SOAPEnvelope envelope) throws AxisFault {
        this.envelope = envelope;
        envelope.toString(); //this line fixes the envelope's namespace problems
        
        String soapNamespaceURI = envelope.getNamespace().getName();

        if (SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI
                .equals(soapNamespaceURI)) {
            isSOAP11 = false;
        } else if (SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI
                .equals(soapNamespaceURI)) {
            isSOAP11 = true;
        } else {
            throw new AxisFault(
                    "Unknown SOAP Version. Current Axis handles only SOAP 1.1 and SOAP 1.2 messages");
        }
    }


So I'm not sure if this is a problem with the Axiom class itself or the Axis2's core use and instantiation of it.  For now we're forced to hack the MessageContext.java file on our side to make this work.

>  Missing namespace on subelement
> --------------------------------
>
>          Key: AXIS2-747
>          URL: http://issues.apache.org/jira/browse/AXIS2-747
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: om
>     Versions: 1.0
>  Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>     Reporter: Qi An
>     Assignee: Ajith Harshana Ranabahu
>     Priority: Critical

>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-747) Missing namespace on subelement

Posted by "Davanum Srinivas (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS2-747?page=all ]

Davanum Srinivas resolved AXIS2-747.
------------------------------------

    Resolution: Fixed

If you see this problem with your WSDL. Please upload the wsdl and the sample client along with the soap request in a new JIRA issue.

thanks,
dims



>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Blocker
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Ajith Harshana Ranabahu (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12433599 ] 
            
Ajith Harshana Ranabahu commented on AXIS2-747:
-----------------------------------------------

Is this still there - I mean has anyone tried the nightlies ?

>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Blocker
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Commented: (AXIS2-747) Missing namespace on subelement

Posted by "Vinh Tran (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS2-747?page=comments#action_12425514 ] 
            
Vinh Tran commented on AXIS2-747:
---------------------------------

I found a resolution to this issue without having to hack the source. It appears shared namespaces with imported schemas will cause this problem. With the changes below, Axis2/Axiom was able to resolve the instance type namespace properly.

Before:
<xsd:schema 
	targetNamespace="http://www.bnn.com/schema/types" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	xmlns:impl="http://www.bnn.com/schema/types" 
	elementFormDefault="qualified"> 
<xsd:import namespace="http://www.bnn.com/schema/types"
	schemaLocation="mySchemaTypes.xsd"/>

After:
<xsd:schema 
	targetNamespace="http://www.bnn.com/SFPService/schema" 
	xmlns:tns="http://www.bnn.com/SFPService/schema"
	xmlns:impl="http://www.bnn.com/schema/types" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
	elementFormDefault="qualified"> 
<xsd:import namespace="http://www.bnn.com/schema/types"
	schemaLocation="mySchemaTypes.xsd"/>

>  Missing namespace on subelement
> --------------------------------
>
>                 Key: AXIS2-747
>                 URL: http://issues.apache.org/jira/browse/AXIS2-747
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: om
>    Affects Versions: 1.0
>         Environment: Windows 2K3, JDK 1.5, AXIS2 1.0 and Eclipse 3.1 with tomcat plugin
>            Reporter: Qi An
>         Assigned To: Ajith Harshana Ranabahu
>            Priority: Critical
>
> The below all worked fine on 0.95:
> The complex type in question is defined in the wsdl as:
> <s:complexType name="Credential">
>   <s:sequence/>
>   </s:complexType>
>  <s:complexType name="EnterpriseCredential"> <s:complexContent>
>   <s:extension base="s0:Credential">
>      <s:sequence/>
>      <s:attribute name="Login" type="s:string" use="required"/>
>      <s:attribute name="Password" type="s:string" use="optional"/>
>      <s:attribute name="Locale" type="s:string" use="optional"/>
>      <s:attribute name="TimeZone" type="s:string" use="optional"/>
>      <s:attribute name="Domain" type="s:string" use="optional"/>
>      <s:attribute name="AuthType" type="s:string" use="optional"/>
>   </s:extension>
>  </s:complexContent>
> </s:complexType>
> In the provider's skeleton, we have the following:
>     public com.businessobjects.dsws.session.LoginResponseDocument login(
>         com.businessobjects.dsws.session.LoginDocument param12)
>         throws  com.businessobjects.dsws.session.SessionSkeleton.DSWSExceptionException, RemoteException {
> 	Login obj = param12.getLogin();
> 	Credential cred = obj.getCredential();
> The problem is, on the getCredential() call, we actually get back an 
> object of type Credential (base class) when the method was invoked with 
> an enterprise credential.  So that further on, on the line:
> EnterpriseCredential enterpriseCredential = (EnterpriseCredential) cred;
> We get a class cast exception.
> Tracing through a bit with the SOAPMonitor, we noticed that the xml 
> envelope actually ends up looking like:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
> <login xmlns="session.dsws.businessobjects.com">
> <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> Password="" Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
> Login="administrator" />
> </login>
> </soapenv:Body>
> </soapenv:Envelope>
> Where the namespace definition of "ses" is clearly missing.  If you 
> trace through the deserialization code a bit, this is why the object 
> comes back as the base class instead of the extended type.
> Once thing interesting one of our developer's noticed, is that if, on 
> the consumer side, you add the lines:
>             XmlOptions op1 = new XmlOptions();
>             op1.setSaveNamespacesFirst();
>             m_credential =
> EnterpriseCredential.Factory.newInstance(op1);
> At the time you create the credential, it seems that *some of the time* 
> this fixes the problem, so that the xml appears as:
> <?xml version='1.0' encoding='utf-8'?>
> <soapenv:Envelope
>  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
> <soapenv:Header />
> <soapenv:Body>
>  <login xmlns="session.dsws.businessobjects.com">
>  <credential xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xmlns:ses="session.dsws.businessobjects.com" Password=""
>  Domain="vanyma01" xsi:type="ses:EnterpriseCredential"
>   Login="administrator" />
>  </login>
>  </soapenv:Body>
> </soapenv:Envelope>
> But only some of the time.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org