I hope that the workaround that I describe is the correct solution.  I
encountered a few and from what I best recall, this was the fix for this
issue.  Feel free to contact me at paul_bo...@hotmail.com.

There was an issue (either AXIS or with the XML beans generated classes)
where the namespace was not always being correctly appended with the
trailing '/'.  I used some debug output statements to output the value.  I
was not successful at uncovering the cause, but arrived at a workaround.  I
ended up getting into the auto-gen stub that extends
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver and added the
following method:


        public org.apache.axiom.soap.SOAPEnvelope
validateNamespace(org.apache.axiom.soap.SOAPEnvelope envelope) {
          java.util.Iterator namespaceIterator = 
envelope.getBody().getChildren();
          while (namespaceIterator.hasNext()) {
                        org.apache.axiom.om.OMNode ns = 
(org.apache.axiom.om.OMNode)
namespaceIterator.next();
                        org.apache.axiom.om.OMElement element = null;

                        if ( ns instanceof org.apache.axiom.om.OMElement){
                           element = (org.apache.axiom.om.OMElement)ns;
                                  if ( 
element.getDefaultNamespace().getNamespaceURI() != null
                                         &&
element.getDefaultNamespace().getNamespaceURI().equals("http://xyz.com/mobility/network/sector/schemas";)
) {
                                        
element.declareDefaultNamespace("http://xyz.com/mobility/network/sector/schemas/";);
                                  }
                          }
          }
          return envelope;



In the various toEnvelope() methods within the same class I added the
following checks:


        if (param != null) {
            envelope.getBody().addChild(toOM(param, optimizeContent));
            return validateNamespace(envelope);
        }
        

Hope this helps.
-- 
View this message in context: 
http://old.nabble.com/Could-not-get-a-Java-Date-type-from-a-Schema-complex-type-tp13028826p26639796.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to