Code Monkey home page Code Monkey logo

paos's People

Contributors

daemianmack avatar delaguardo avatar dg4227 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

paos's Issues

Add Testing documentation to readme

i tried lein test which gave me a response telling me that i don't have a project.clj
i'm not sure how to run the tests outside of a repl or using clj/clojure commands

service/wrap-body ignores array of scalar types

I have a complex type like:

<s:complexType name="ArrayOfString">
        <s:sequence>
          <s:element maxOccurs="unbounded" minOccurs="0" name="string" nillable="true" type="s:string"/>
        </s:sequence>
      </s:complexType>

Another complex type refers to it like so:

...
<s:element maxOccurs="1" minOccurs="0" name="ValidationGroupList" type="tns:ArrayOfString"/>
...

I have tried multiple options to set this attribute in the 'context' object

"ValidationGroupList" ({"string" {:__value "BO_GeneralInfoModule"}})

or

"ValidationGroupList" ({:__value "BO_GeneralInfoModule"}),

(service/wrap-body srv context) converts the deeply nested object into proper namespaced xml, but ValidationGroupList is empty, given either of the above context objects.

Here, 'context' is the merged mapping and data (similar to your example in README). Note that every other attribute in the nested complex object is converted fine, except for the "array of strings" complex type.

There is no error and I can't debug this since it's using selma's template internally.

Suggestion?

add protocol or interface for SOAPClient

Something like that

(defprotocol PSOAPClient
    (soap-action [this])
    (send [this context])
    (parse [this])
    (-request-body [this context])
    (-response-body [this context]))

Object initializer how will implement that protocol should get as an arguments result of WSDL parsing for specific soap-action.

add function builder for making response parsers based on output-mapping from parsed wsdl

Incomming data:

{:soapenv:Envelope ;; Top level xml tag
   {:soapenv:Header nil,
    :soapenv:Body
    {:v1:airlineByIcaoResponse
     {:return|attrs ;; set of attributes for :return tag
      {:offset nil}
      :return ;; this xml tag can be found multiple times in parent tag (:v1:airlineByIcaoResponse)
      [{:category nil,
        :iata nil,
        :name nil,
        :icao nil,
        :dateFrom nil,
        :dateTo nil,
        :active nil,
        :phoneNumber nil,
        :fs nil}]}}}}

Output:

fn xml_string => map

This function should use clojure.zip for lazy xml parsing without growing heap.

WS-Security headers

Hi!

I'm trying to build a request for a SOAP service that requires WS-Security headers. It expects a call like this:

Screen Shot 2019-04-05 at 06 14 50

I tried associating a map with the expected headers into the mapping like so:

(assoc-in mapping ["Envelope" "Header"] {"wsse:Security" {"wsse:UsernameToken" {"wsse:Username" "a" "wsse:Password" "c"}}})

The problem is that the wrap-body fn seems to ignore this. Can you shed a light on how to add this type of headers into the SOAP envelope? Thanks!

Error to download (java 11.0.7)

I'm having trouble when I try to install the library, below my deps and the problem I've been having.

deps:

{:aliases {:deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "0.8.599"}}}
           :depstar {:extra-deps {seancorfield/depstar {:mvn/version "0.3.4"}}}
           :test {:extra-paths ["test"]}}
 :deps {com.novemberain/langohr {:mvn/version "5.1.0"}
        commons-codec/commons-codec {:mvn/version "1.13"}
        commons-validator/commons-validator {:mvn/version "1.6"}
        cheshire/cheshire {:mvn/version "5.9.0"}
        clj-http/clj-http {:mvn/version "3.10.0"}
        clj-time/clj-time {:mvn/version "0.15.2"}
        io.xapix/paos {:mvn/version "0.2.4"}
        org.clojure/clojure {:mvn/version "1.10.1"}
        org.clojure/data.generators {:mvn/version "0.1.2"}
        org.clojure/tools.logging {:mvn/version "0.5.0"}}
 :mvn/repos {"enonic" {:url "https://repo.enonic.com/public/"}
             "central" {:url "https://repo1.maven.org/maven2/"}
             "clojars" {:url "https://clojars.org/repo"}}
 :paths ["resources" "src/main/clojure"]}

error:

clj -A:depstar -m hf.depstar.uberjar target/"clj-zzk"-"0.0.1".jar
Downloading: net/sf/saxon/saxon/9.1.0.8/saxon-9.1.0.8.jar from enonic
Downloading: org/apache/xmlbeans/xmlbeans/2.6.0/xmlbeans-2.6.0.jar from central
Downloading: inflections/inflections/0.13.0/inflections-0.13.0.jar from clojars
Error building classpath. Could not transfer artifact org.clojure:google-closure-library:jar:0.0-20130212-95c19e7f0f5f from/to central (https://repo1.maven.org/maven2/): Range Not Satisfiable (416)
Makefile:17: recipe for target 'uberjar' failed
make[1]: *** [uberjar] Error 1
make[1]: Leaving directory '/home/rafael/Projects/zzk/clj-zzk'
Makefile:10: recipe for target 'install' failed
make: *** [install] Error 2

Could not resolve dependencies

I having this error when trying to launch my REPL or deploying to Heroku. 3 days ago I had no problems using paos.

Could not transfer artifact net.sf.saxon:saxon:pom:9 from/to jboss (https://repository.jboss.org/nexus/content/repositories/deprecated/): Connection reset
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.

This is part of my project.clj

  :repositories [["enonic" "https://repo.enonic.com/public/"]]
  :dependencies 
               [[camel-snake-kebab "0.4.2"]
                 [clj-http "3.10.1"]
                 [environ "1.2.0"]
                 [integrant "0.8.0"]
                 [integrant/repl "0.3.1"]
                 [io.xapix/paos "0.2.4"]
                 [metosin/reitit "0.5.10"]
                 [org.clojure/clojure "1.10.1"]
                 [org.postgresql/postgresql "42.2.14"]
                 [ovotech/ring-jwt "1.3.0"]
                 [ring "1.8.2"]
                 [seancorfield/next.jdbc "1.1.613"]
                 [buddy "2.0.0"]
                 [clojure.java-time "0.3.2"]
                 [ring/ring-mock "0.4.0"]
                 [ring-cors "0.1.13"]]

No success searching for a solution and now I'm stuck. Will appreciate your help.

Tried to use insecure HTTP repository without TLS.

i'm getting this when using lein deps on a new project with the only deps being clojure and paos.

this is from lein help faq

**Q:** I got `Tried to use insecure HTTP repository without TLS`, what is that about?  
**A:** This means your project was configured to download dependencies
from a repository that does not use TLS encryption. This is very
insecure and exposes you to trivially-executed man-in-the-middle attacks.

soap-ws parts are served from insecure repo

Leiningen and boot complains about dependencies coming from non-https repositories.

  • Discuss with soap-ws author about possibilities to move dependencies to secure storage.
  • Reimplement features from soap-ws with the only clojure
    • Collect all the schema files from given WSDL
    • Parse data type definitions from schema files
    • Build empty messages same way as soap-ws

Error with <![CDATA[]]> present in output template

Hello,

I've been happily running version 0.2.4 of this library for awhile now. Recently, things stopped working altogether in the production Docker container. I'm seeing some strange behavior and I'm not sure how to track down the root cause.

I load a WSDL file as a classpath resource and pass it to paos.wsdl/parse. This passes.
I grab my reified service instance from the wsdl service object without issue.
I call (paos.service/request-template service). Locally, the template looks normal and has blocks like this:
{% with ctx=Envelope %}{% with ctx=ctx.Header %}. But in the Docker container, it looks something like this: <![CDATA[{% with ctx=Envelope %}]><![CDATA[{% with ctx=ctx.Header %}]>.

Locally, when I try to substitute my parameters into the template using (service/wrap-body service body), the substitution happens properly. But when this call is performed inside of the Docker container, the parameter values are not substituted, and the <![CDATA[]]> blocks remain, so it looks something like this: <![CDATA[]]><![CDATA[]]>

As best as I can tell, both environments are using JDK17, the same JARs (lein is being used to pull the JARs for both environments), and Clojure 1.11.1.

Any ideas on what's going on here or what I can do to troubleshoot this?

EDIT: I've narrowed this down a bit. Something is happening with the artifact produced by the lein uberjar task that causes it to produce different output for the aforementioned task than what happens via thelein repl. Neither Docker nor the JDK appear to be at fault here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.