I have problem in deploy a new process using apache ode deployment service.

problem is: the files extracted from zip folder are created in a sub folder
. main folder name is created with the name given plus version . under this
with name its self a folder gets created and all files are there. due to
this subfolder the files cannot be viewed.


my sorce code:

SOAPFactory factory = OMAbstractFactory.getSOAP11Factory();
        OMNamespace omn =
factory.createOMNamespace("http://www.apache.org/ode/pmapi";, "tns");  
                OMNamespace soapnm =
factory.createOMNamespace("http://schemas.xmlsoap.org/soap/envelope/";,
"SOAP-ENV");
        OMElement message = factory.createOMElement("Envelope",soapnm);
                OMElement body = factory.createOMElement("Body",soapnm);
                message.addChild(body);
                OMNamespace depns = 
factory.createOMNamespace(Namespaces.ODE_PMAPI,
"deployapi");
        OMElement root = factory.createOMElement("deploy", omn);
                body.addChild(root);
        OMElement namePart = factory.createOMElement("name", depns);
        namePart.setText(packageName);
        OMElement zipPart = factory.createOMElement("package", depns);
        OMElement zipElmt =factory.createOMElement("zip", depns);
                System.out.println("zip part :"+ zipPart);
                System.out.println("zip element :"+ zipElmt);


        // Add the zip to deploy
        File fileName = new File(path);
                InputStream istream = new FileInputStream(fileName);
                System.out.println("stream : "+ istream);
                BufferedInputStream is = new BufferedInputStream(istream);  
        System.out.println("is :" + is);
            


                ByteArrayOutputStream outputStream = new 
ByteArrayOutputStream();
        byte[] buffer = new byte[4096];
        int len;
        while((len = is.read(buffer)) >= 0) {
                outputStream.write(buffer, 0, len);
        }
        String base64Enc = Base64.encode(outputStream.toByteArray());
        OMText zipContent = factory.createOMText(base64Enc,
"application/zip", true);
        root.addChild(namePart);
        root.addChild(zipPart);
        zipPart.addChild(zipElmt);
        zipElmt.addChild(zipContent);
                System.out.println("root input :" + message);
        // Deploy
                

                InputStream instreams = null;
                                try 
                                {
                                           instreams = new 
StringBufferInputStream(message.toString());
                                } 
                                catch (java.lang.Exception e)
                                {
                                                System.out.println("file not 
found " + e.toString());
                                }
        String soapresult = HttpSoapSender.doSend(new
URL("http://127.0.0.1:8080/ode/processes/DeploymentService";),instreams,"1",0,"admin","axis2",null);;
                System.out.println("result :" + soapresult);
                AXIOMUtil axutil = new AXIOMUtil();
                org.apache.axiom.om.OMElement result = 
axutil.stringToOM(soapresult) ; 
        deployed.clear();
       
        Iterator iter = result.getChildElements();
            while (iter.hasNext())
                        {
                OMElement e = (OMElement) iter.next();
                        System.out.println("etext : "+ e.getText());
                        System.out.println("local name : "+ e.getLocalName());
                        if (e.getLocalName().equals("name"))
                                {
                pakage = e.getText();
                                System.out.println("package :" +pakage);
                    }
                                if (e.getLocalName().equals("id"))
                                {
                                        deployed.add(e.getTextAsQName());
                                }
          }
            }
                catch(Exception e)
                {
            e.printStackTrace();
                        
                }



and the error i got  " cannot found deploy.xml "


-- 
View this message in context: 
http://www.nabble.com/apache-ode-deployment-service-deploy-error-tp21471030p21471030.html
Sent from the Apache Ode User mailing list archive at Nabble.com.

Reply via email to