Submit model -

Discussion in 'Shapeways API' started by sebtest, Mar 30, 2011.

  1. sebtest
    sebtest New Member
    Hi
    I'm trying to discuss with shapeways.com server to upload a zip file.
    Here are the exchanges between my program and the server.
    What I dont understand is why the server answers with a new session_id when I invoked the submit_model API.

    Thank you for your help
    seb

    here are the exchanges:

    -------------------
    POST /modules/shapeways_api/webservice/v1/soap.php HTTP/1.1
    Host: localhost
    Content-Type: application/soap-xml; charset="utf-8"
    Content-Length: 568

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:SW.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <ns1:login>
    <username xsi:type="xsd:string">sebtest</username>
    <password xsi:type="xsd:string">my_real_password_was_there</password >
    <application_id xsi:type="xsd:string">Test</application_id>
    </ns1:login>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>


    -------------------
    HTTP/1.1 200 OK
    Date: Wed, 30 Mar 2011 20:38:51 GMT
    Server: Apache/2.0.52 (Red Hat)
    X-Powered-By: PHP/5.2.13
    Set-Cookie: iep=tgg0d4d802mk44tbgsk3fal824; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Content-Length: 532
    Vary: Accept-Encoding
    Content-Type: text/xml; charset=utf-8

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:SW.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:loginResponse><loginReturn xsi:type="xsd:string">tgg0d4d802mk44tbgsk3fal824</loginReturn ></ns1:loginResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

    -------------------

    session identifer found = tgg0d4d802mk44tbgsk3fal824

    -------------------
    POST /modules/shapeways_api/webservice/v1/soap.php HTTP/1.1
    Host: localhost
    Content-Type: application/soap-xml; charset="utf-8"
    Content-Length: 1542

    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="urn:SW.wsdl" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
    <ns1:submitModel>
    <session_id xsi:type="xsd:string">tgg0d4d802mk44tbgsk3fal824</session_id >
    <model xsi:type="ns1:SWModel">
    <desc xsi:type="xsd:string">Test</desc>
    <file xsi:type="xsd:base64Binary"> VUVzREJCUUFDQUFJQU9LcGZqNEFBQUFBQUFBQUFBQUFBQUFIQUJBQWMyVmlM bmR5YkZWWURBQ29nWk5OT0lHVFRmVUJGQUJ0amtzTGdrQVVoZGZlWDNHZ2Jj V29CVzBqRWdMYkpMaUpGdUpNSlpRak5rRVIvdmZtSlFiR3dHWE9kKzdqVFBM RFBrVWV6Um1lNnJ3aXlxNUZJK2hEd0VYSXUxRHRHN3VhaTVmZ1NWR0tUQ2p0 R0JkNHlGdkZrYXpUYkVzV2xGSzJIQnRUcTdwUXdrTFhDelN5cWhXT1hnV21N UE9tTlB6bkxCeWtGdjlJTDczTmxxNTZmTEw3dTU4OE5yeS9HN2pqZWxlSUNE Rm1JVVo4TWFLbWQwek4vSmpHZW9lalBUR0pPdXJvQzFCTEJ3aFFGMzBkclFB QUFHa0JBQUJRU3dFQ0ZRTVVBQWdBQ0FEaXFYNCtVQmQ5SGEwQUFBQnBBUUFB QndBTUFBQUFBQUFBQUFCQXBJRUFBQUFBYzJWaUxuZHliRlZZQ0FDb2daTk5P SUdUVFZCTEJRWUFBQUFBQVFBQkFFRUFBQUR5QUFBQUFBQT0= </file>
    <filename xsi:type="xsd:string">out.zip</filename>
    <title xsi:type="xsd:string">Test</title>
    <view_state xsi:type="xsd:string">1</view_state>
    <tags xsi:type="xsd:string">Test</tags>
    <has_color xsi:type="xsd:boolean">1</has_color>
    <modeltype xsi:type="xsd:string">ZIP</modeltype>
    </model>
    <application_id xsi:type="xsd:string">Test</application_id>
    </ns1:submitModel>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    -------------------

    HTTP/1.1 200 OK
    Date: Wed, 30 Mar 2011 20:38:52 GMT
    Server: Apache/2.0.52 (Red Hat)
    X-Powered-By: PHP/5.2.13
    Set-Cookie: iep=197umsugmieutsuc96481i29l4; path=/
    Expires: Thu, 19 Nov 1981 08:52:00 GMT
    Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
    Pragma: no-cache
    Content-Length: 532
    Vary: Accept-Encoding
    Content-Type: text/xml; charset=utf-8

    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="urn:SW.wsdl" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:loginResponse><loginReturn xsi:type="xsd:string">197umsugmieutsuc96481i29l4</loginReturn ></ns1:loginResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>


     
  2. horst
    horst New Member
    Seb--I'll share these questions with the development team and we'll get back with more detailed answers.

    Have you reviewed the documentation and code example at http://www.shapeways.com/api already?
     
    Last edited: Mar 31, 2011
  3. horst
    horst New Member
    Seb, how are you doing? Have you had any better luck with the API, and have you been able to review our sample code?

    -Ben
     
  4. sebtest
    sebtest New Member
    Hi Ben

    Unfortunately, I stopped these developments and made a php one.
     
  5. horst
    horst New Member
    I'm not sure what you mean. Did you create a PHP app to work with our API, or something else entirely? Did you use any of the sample PHP code we provide for download at shapeways.com/api ?
     
  6. sebtest
    sebtest New Member
    Yes. something totally new where I send the model via HTTP POST protocol to my website. and my website just send it to shapeways.com using PHP.
     
  7. horst
    horst New Member
    We are looking forward to seeing your project once it's complete and launched!