Announcement Announcement Module
Collapse
No announcement yet.
Ignore Child Type Warning Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ignore Child Type Warning

    hi!!!

    i'm implementing an endpoint but it throws this warning

    13:06:11,872 WARN [EnvelopeBuilderDOM] Ignore child type: 3
    13:06:11,934 INFO [STDOUT] [Element: <MethodList/>]

    Code:
    package org.dslforum.cwmp_1_1;
    
    import org.jdom.Attribute;
    import org.jdom.Element;
    import org.jdom.Namespace;
    import org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint;
    
    public class GetRPCMethods extends AbstractJDomPayloadEndpoint{
        
        private String nameSpaceURI = "urn:dslforum-org:cwmp-1-1";
        private Namespace nameSpace;
        
        @Override
    	protected Element invokeInternal(Element solicitud) throws Exception {
    	
        	nameSpace = solicitud.getNamespace();
    		
    		Element respuesta = new Element("GetRPCMethodsResponse",nameSpace);
    		
    		Element listaMetodos = new Element("MethodList");
    		//Attribute att = new Attribute("arrayType","xsd:String[3]");
    		//listaMetodos.setAttribute(att);
    		
    		Element metodo = new Element("Inform");
    		listaMetodos.addContent(metodo);
    		
    		metodo = new Element("GetRPCMethods");
    		listaMetodos.addContent(metodo);
    		
    		metodo = new Element("TransferComplete");
    		listaMetodos.addContent(metodo);
    		
    		System.out.println(listaMetodos);
    		respuesta.setContent(listaMetodos);
    		
    		return respuesta;
    	}
    
    
    }
    i'm trying to generate a method list to response to client, but it doesnt work

    this is the incoming message
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <soap:Envelope 
    	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
     	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
    	xmlns:cwmp="urn:dslforum-org:cwmp-1-1">
    
    	<soap:Header>
    	</soap:Header>
    
    	<soap:Body>
    		<cwmp:GetRPCMethods/>
    	</soap:Body>
    
    </soap:Envelope>
    this is the fault response i get
    Code:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
       <env:Header/>
       <env:Body>
          <env:Fault>
             <faultcode xmlns:valueNS="http://schemas.xmlsoap.org/soap/envelope/">valueNS:Server</faultcode>
             <faultstring xml:lang="en">Index: 0, Size: 0</faultstring>
          </env:Fault>
       </env:Body>
    </env:Envelope>
    can anybody help me??? i think that i create bad response or something like that

    thk in advance
    Last edited by neotherack; Jul 7th, 2009, 11:42 AM.

  • #2
    There's some things you can figure out just from some intelligent googling. Searching for "Ignore child type:" tells me that this warning/error isn't emitted by Spring, but by a JBoss SOAP handler. That by itself make it seem like you haven't configured the Spring listener correctly.

    The particular error refers to the fact that it found a TEXT node, and not an ELEMENT node. A worthwhile experiment would be to compress your test message to remove all inter-element spaces, just to see if it gets past that problem. That probably isn't your "root" problem, but it might be informative.

    Comment


    • #3
      muchisimas gracias!!!!!! (spanish :P )

      thanks!!!!

      Comment


      • #4
        In case someone else runs into this, can you detail exactly what you changed that resolved this problem? I didn't intend the removal of spaces to "fix" your problem, it was just to gather information. Any SOAP listener that can't handle spaces between elements is seriously broken.

        Comment


        • #5
          i'm working about rigth now, but i'll be back when i solve it.
          i found some "bugs" in my spring-servlet config file

          i'll be back, i promise

          Comment


          • #6
            problem not fixed

            here is my endpoint:
            Code:
            package org.dslforum.cwmp_1_1; 
             
            import org.jdom.Element; 
            import org.jdom.Namespace; 
            import org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint; 
             
            public class GetRPCMethods extends AbstractJDomPayloadEndpoint{ 
                 
                private Namespace nameSpace;
                private Namespace nameSpace1;
                private Namespace nameSpace2;
            
            	@Override 
            	protected Element invokeInternal(Element element) throws Exception { 
            		
            		System.out.println("Recibido");
            		
            		nameSpace = element.getNamespace("cwmp");
            		nameSpace1 = element.getNamespace("soap");
            		nameSpace2 = element.getNamespace("soap-enc");
            		
            		System.out.println(nameSpace);
            		System.out.println(nameSpace1);
            		System.out.println(nameSpace2);
            		 
            		Element respuesta = new Element("GetRPCMethodsResponse",nameSpace); 
            		 
            		Element listaMetodos = new Element("MethodList",nameSpace); 
            		//listaMetodos.setAttribute("soap-enc:arrayType", "xsd:string[3]",nameSpace2); 
            		 
            		Element metodo1 = new Element("string"); 
            		metodo1.setText("GetRPCMethods");
            		 
            		Element metodo2 = new Element("string"); 
            		metodo2.setText("Inform");
            		
            		Element metodo3 = new Element("string"); 
            		metodo1.setText("TransferComplete");
            		 
            		listaMetodos.addContent(metodo1);
            		listaMetodos.addContent(metodo2);
            		listaMetodos.addContent(metodo3);
            		
            		respuesta.addContent(listaMetodos); 
            		return respuesta; 
            	} 
            }

            this is the log when i've not already deleted spaces

            SOAP Message:
            Code:
            <?xml version="1.0" encoding="UTF-8"?>
            <soap:Envelope 
            	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"	
            	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"	
            	xmlns:cwmp="urn:dslforum-org:cwmp-1-1">
            
            	<soap:Header>
            		<cwmp:ID mustUnderstand="1">1234</cwmp:ID>
            		<cwmp:HoldRequests mustUnderstand="1">false</cwmp:HoldRequests>
            	</soap:Header>
            	<soap:Body>
            		<cwmp:GetRPCMethodsRequest/>
            	</soap:Body>
            </soap:Envelope>
            jBossLog:
            Code:
            19:52:32,971 INFO  [SaajSoapMessageFactory] Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
            19:52:33,003 INFO  [MessageDispatcherServlet] FrameworkServlet 'spring-ws': initialization completed in 6492 ms
            19:52:33,081 WARN  [EnvelopeBuilderDOM] Ignore child type: 3
            19:52:33,096 WARN  [EnvelopeBuilderDOM] Ignore child type: 3
            19:52:33,096 WARN  [EnvelopeBuilderDOM] Ignore child type: 3
            19:52:33,143 INFO  [STDOUT] Recibido
            19:52:33,143 INFO  [STDOUT] [Namespace: prefix "cwmp" is mapped to URI "urn:dslforum-org:cwmp-1-1"]
            19:52:33,143 INFO  [STDOUT] null
            19:52:33,143 INFO  [STDOUT] null
            when use "compressed message":

            message:
            Code:
            <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"	xmlns:cwmp="urn:dslforum-org:cwmp-1-1"><soap:Header><cwmp:ID mustUnderstand="1">1234</cwmp:ID><cwmp:HoldRequests mustUnderstand="1">false</cwmp:HoldRequests></soap:Header><soap:Body><cwmp:GetRPCMethodsRequest/></soap:Body></soap:Envelope>

            log:
            Code:
            19:55:25,711 INFO  [STDOUT] Recibido
            19:55:25,711 INFO  [STDOUT] [Namespace: prefix "cwmp" is mapped to URI "urn:dslforum-org:cwmp-1-1"]
            19:55:25,711 INFO  [STDOUT] null
            19:55:25,711 INFO  [STDOUT] null

            compression solves the ignore child warning, but the problem reading the request persists. For sending SOAP requests i'm using soapUI, and there i can read a message fault
            Code:
            <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
               <env:Header/>
               <env:Body>
                  <env:Fault>
                     <faultcode xmlns:valueNS="http://schemas.xmlsoap.org/soap/envelope/">valueNS:Server</faultcode>
                     <faultstring xml:lang="en">Index: 0, Size: 0</faultstring>
                  </env:Fault>
               </env:Body>
            </env:Envelope>
            why i can't read only one nameSpace??? i don't now if i get fault in message reception or responding

            thanks in advance!!

            Comment


            • #7
              Using Eclipse debug sistem i've found an error.......

              it said "Source not found" for jDom, but jDom.jar library is already linked to my project in Eclipse. is searching for "...abstractjdom...endpoint".java???

              the spring-ws-1.5.6-all.jar (linked to project too) includes the Class files needed, i need another one??

              any ideas??? i think that is not one issue, can be more than one issue??

              any idea can help me, thanks in advance!!!

              Comment


              • #8
                Class files are not source files. You need to separately install a source distribution (if it didn't come with the binary installation) and attach those to the jar file containing the class files. First determine whether the binary installation of each product comes with a source distribution. If it does, attach that directory or archive to the jar file in Eclipse. If not, look at the download area for each product to find a source distribution.

                Comment


                • #9
                  50% ready...... i've correctly linked the source files, searching for spring packages "source included" has solved this issue.

                  but the

                  Ignore child warning persists, as you said:

                  if i send the soap message:
                  Code:
                  <?xml version="1.0" encoding="UTF-8"?>
                  <soap:Envelope 
                  	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"	
                  	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"	
                  	xmlns:cwmp="urn:dslforum-org:cwmp-1-1">
                  
                  	<soap:Header>
                  		<cwmp:ID mustUnderstand="1">1234</cwmp:ID>
                  		<cwmp:HoldRequests mustUnderstand="1">false</cwmp:HoldRequests>
                  	</soap:Header>
                  
                  	<soap:Body>
                  		<cwmp:GetRPCMethodsRequest/>
                  	</soap:Body>
                  
                  </soap:Envelope>
                  i get this warnings ("ignore child type:3") (and fault response at SoapUI):
                  Code:
                  <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                     <env:Header/>
                     <env:Body>
                        <env:Fault>
                           <faultcode xmlns:valueNS="http://schemas.xmlsoap.org/soap/envelope/">valueNS:Server</faultcode>
                           <faultstring xml:lang="en">Index: 0, Size: 0</faultstring>
                        </env:Fault>
                     </env:Body>
                  </env:Envelope>

                  if i send the "compressed" soap message:
                  Code:
                  <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"	xmlns:cwmp="urn:dslforum-org:cwmp-1-1"><soap:Header><cwmp:ID mustUnderstand="1">1234</cwmp:ID><cwmp:HoldRequests mustUnderstand="1">false</cwmp:HoldRequests></soap:Header><soap:Body><cwmp:GetRPCMethodsRequest/></soap:Body></soap:Envelope>
                  i get this fault response at SoapUI (without warnings in eclipse):
                  Code:
                  <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                     <env:Header/>
                     <env:Body>
                        <env:Fault>
                           <faultcode xmlns:valueNS="http://schemas.xmlsoap.org/soap/envelope/">valueNS:Server</faultcode>
                           <faultstring xml:lang="en">org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.</faultstring>
                        </env:Fault>
                     </env:Body>
                  </env:Envelope>
                  at this moment this is my root issue, i'm working about.
                  when i solve it, i'll be back XD

                  can anybody help me? thanks!

                  Comment


                  • #10
                    here my endpoint code:
                    Code:
                    package org.dslforum.cwmp_1_1; 
                     
                    import java.io.IOException;
                    
                    import org.jdom.Document;
                    import org.jdom.Element;
                    import org.jdom.Namespace;
                    import org.jdom.output.XMLOutputter;
                    import org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint;
                     
                    public class GetRPCMethods extends AbstractJDomPayloadEndpoint{ 
                         
                        private Namespace soapenc = Namespace.getNamespace("soap-enc", "http://schemas.xmlsoap.org/soap/encoding/");
                        private Namespace soapenv = Namespace.getNamespace("soap-env", "http://schemas.xmlsoap.org/soap/envelope/");
                        private Namespace cwmp = Namespace.getNamespace("cwmp", "urn:dslforum-org:cwmp-1-1");
                        private Namespace xsd = Namespace.getNamespace("xsd","http://www.w3.org/2001/XMLSchema");
                        
                    
                    	@Override 
                    	protected Element invokeInternal(Element element) throws Exception { 
                    
                    		Element respuesta = new Element("GetRPCMethodsResponse",cwmp);
                    		Element listado = new Element("MethodList");
                    		listado.setAttribute("arrayType", "xsd:string[3]", soapenc);
                    		
                    		Element metodo = new Element("string");
                    		metodo.setText("Inform");
                    		listado.addContent(metodo);
                    		
                    		Element metodo2 = new Element("string");
                    		metodo2.setText("GetRPCMethods");
                    		listado.addContent(metodo2);
                    		
                    		Element metodo3 = new Element("string");
                    		metodo3.setText("TransferComplete");
                    		listado.addContent(metodo3);
                    		
                    		respuesta.addContent(listado);
                    				
                    		return respuesta;
                    	} 
                     
                    }

                    this is de soap message that i need:

                    Code:
                    <?xml version="1.0" encoding="UTF-8"?>
                    <soap:Envelope 
                    	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"	
                    	xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"	
                    	xmlns:cwmp="urn:dslforum-org:cwmp-1-1">
                    
                    	<soap:Header/>
                    	<soap:Body>
                    		<cwmp:GetRPCMethodsResponse>
                    			<MethodList soap-enc:arrayType="xsd:string[3]">
                    				<string>GetRPCMethods</string>
                    				<string>Inform</string>
                    				<string>TransferComplete</string>
                    		</cwmp:GetRPCMethodsResponse>
                    	</soap:Body>
                    
                    </soap:Envelope>
                    I don't know, why can't i generate it?

                    Comment


                    • #11
                      I've changed my endpoint code again, now there is no warnings at Eclipse but i get a fault response when i try to generate a message response.

                      this is my java code:

                      Code:
                      package endpoints; 
                       
                      import org.jdom.Element;
                       
                      public class GetRPCMethods extends endpointBase{ 
                      
                      	@Override 
                      	protected Element invokeInternal(Element element) throws Exception { 
                      
                      		Element rootElement = new Element("GetRPCMethodsResponse",urn);
                      		Element listado = new Element("MethodList",urn);
                      		//listado.setAttribute("arrayType", "xsd:string[3]", soapenc);
                      		
                      		Element metodo = new Element("string");
                      		metodo.setText("Inform");
                      		listado.addContent("\n ");
                      		listado.addContent(metodo);
                      		
                      		Element metodo2 = new Element("string");
                      		metodo2.setText("GetRPCMethods");
                      		listado.addContent("\n ");
                      		listado.addContent(metodo2);
                      		
                      		Element metodo3 = new Element("string");
                      		metodo3.setText("TransferComplete");
                      		listado.addContent("\n ");
                      		listado.addContent(metodo3);
                      		
                      		rootElement.addContent("\n ");
                      		rootElement.addContent(listado);
                      		
                      	        log(rootElement);
                      		return rootElement;
                      	} 
                      }
                      i've tried with and without the something.addContent("\n "); no differences between them
                      same for the something.setAttributes() all time i get faults
                      Code:
                      package endpoints; 
                       
                      import java.io.IOException;
                      
                      import org.jdom.Document;
                      import org.jdom.Element;
                      import org.jdom.Namespace;
                      import org.jdom.output.XMLOutputter;
                      import org.springframework.ws.server.endpoint.AbstractJDomPayloadEndpoint;
                       
                      public abstract class endpointBase extends AbstractJDomPayloadEndpoint{ 
                           
                          protected final Namespace soapenc = Namespace.getNamespace("soap-enc", "http://schemas.xmlsoap.org/soap/encoding/");
                          protected final Namespace soapenv = Namespace.getNamespace("soap-env", "http://schemas.xmlsoap.org/soap/envelope/");
                          protected final Namespace urn = Namespace.getNamespace("urn", "urn:dslforum-org:cwmp-1-1");
                          protected final Namespace xsd = Namespace.getNamespace("xsd","http://www.w3.org/2001/XMLSchema");
                      
                      	protected void log (Element rootElement){
                      	
                      		Document doc = new Document(rootElement);
                      	    try {
                      	      XMLOutputter serializer = new XMLOutputter();
                      	      serializer.output(doc, System.out);
                      	    }
                      	    catch (IOException e) {
                      	      System.err.println(e);
                      	    }	
                      	} 
                      }
                      and this is the fault i get
                      Code:
                      <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
                         <env:Header/>
                         <env:Body>
                            <env:Fault>
                               <faultcode xmlns:valueNS="http://schemas.xmlsoap.org/soap/envelope/">valueNS:Server</faultcode>
                               <faultstring xml:lang="en">org.jdom.JDOMException: Exception in startElement: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.</faultstring>
                            </env:Fault>
                         </env:Body>
                      </env:Envelope>
                      something wrong??? i think that java code is OK, can be a JAR library link error???
                      i've linked: "jdom-1.0.jar" "spring-context-sources.jar" "spring-webmvc.2.5.6.jar" "spring-webmvc-sources.jar" "spring-ws-1.5.6-all.jar" "spring-ws-1.5.6-sources.jar"

                      any idea can help, thanks!!
                      Last edited by neotherack; Jun 21st, 2009, 07:31 PM.

                      Comment


                      • #12
                        i've worked about last 3 days but i cannot solve this issue

                        can anybody help me?

                        Comment


                        • #13
                          Solved!!!!

                          solution:

                          add this code to spring-ws-servlet.xml
                          Code:
                          	<bean id="messageFactory"
                          		class="org.springframework.ws.soap.axiom.AxiomSoapMessageFactory">
                          		<property name="payloadCaching" value="false" />
                          	</bean>
                          add the "axiom.jar" library to my lib folder

                          SAHAGUN Rules!

                          Comment

                          Working...
                          X