Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
~Coxy
Dec 9, 2003

R.I.P. Inter-OS Sass - b.2000AD d.2003AD

CPColin posted:

don't ask the users of my company's website.

nobody* pays enough for you care about user experience

Adbot
ADBOT LOVES YOU

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe
gently caress your WebServices in their soapy rear end Shaggar. You lied to me, you told me cfx was the best, but it's been nothing but torture. Ok so cfx by itself is great, but the guy who thought WS-Security was a good idea should die a terrible death.

I've got a WSDL that has this:
XML code:
<wsp:Policy wsu:Id="policy0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
        <wsp:ExactlyOne>
            <wsp:All>
                <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="urn:VendorWebService:FreeBalanceInquiry">

                    <sp:Body/>
                </sp:SignedParts>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>
but cfx won't loving sign the body like it asks, it says that one of TransportBinding, AsymmetricBinding, or SymmetricBinding is required but I can't find anywhere in the spec that says this is true so I can't tell the guys who made it that it's wrong.

I've since tried switching to using the default Java WS tools to see if they are less picky about that but that's even more of a clusterfuck. Now to configure the keystore I have to create some dumbshit wsit-client.xml that just makes my eyes glaze over and wish for sweet death.

Can anyone confirm if that wsp:Policy is incorrect so that I can stop banging my head against the wall?

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
lol u believed shaggar

Shaggar
Apr 26, 2006

Janitor Prime posted:

gently caress your WebServices in their soapy rear end Shaggar. You lied to me, you told me cfx was the best, but it's been nothing but torture. Ok so cfx by itself is great, but the guy who thought WS-Security was a good idea should die a terrible death.

I've got a WSDL that has this:
XML code:
<wsp:Policy wsu:Id="policy0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
        <wsp:ExactlyOne>
            <wsp:All>
                <sp:SignedParts xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:tns="urn:VendorWebService:FreeBalanceInquiry">

                    <sp:Body/>
                </sp:SignedParts>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>
but cfx won't loving sign the body like it asks, it says that one of TransportBinding, AsymmetricBinding, or SymmetricBinding is required but I can't find anywhere in the spec that says this is true so I can't tell the guys who made it that it's wrong.

I've since tried switching to using the default Java WS tools to see if they are less picky about that but that's even more of a clusterfuck. Now to configure the keystore I have to create some dumbshit wsit-client.xml that just makes my eyes glaze over and wish for sweet death.

Can anyone confirm if that wsp:Policy is incorrect so that I can stop banging my head against the wall?

I've never done ws-security in cxf. maybe take a look at this: http://concentricsky.com/blog/2012/dec/implementing-ws-security-cxf-wsdl-first-web-service (take a look at the "Configure the Client" section)

If you are signing the body of your thing you will need a keystore that contains your private key. It looks like there are some properties to set that tell cxf where the keystore is, its password, and the alias/pw of the private key (if it has a pw). should be pretty easy. wcf is easier tho.

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

Shaggar posted:

I've never done ws-security in cxf. maybe take a look at this: http://concentricsky.com/blog/2012/dec/implementing-ws-security-cxf-wsdl-first-web-service (take a look at the "Configure the Client" section)

If you are signing the body of your thing you will need a keystore that contains your private key. It looks like there are some properties to set that tell cxf where the keystore is, its password, and the alias/pw of the private key (if it has a pw). should be pretty easy. wcf is easier tho.

I don't have the option of using wcf since our whole stack is RedHat/Java. That's the same guide I used to verify my setup after I started searching around for answers, so I'm confident I've setup all the keystore stuff in cxf.

I really think the problem is in the WSDL but I can't for the life of me confirm if it's correct and the problem is on my side or if it's borked and I need to yell at the developer. In that guide if you notice the Complete Tutorial Binding Assertion has a section about sp:AsymmetricBinding which is missing in mine and cfx is bitching about it. I've tried adding it by hand but holy poo poo everything blew up after that. In desperation I tried to use Axis2 but LOL that library doesn't even know how to declare it's dependencies and I had to track down like 10 libs by hand.

I've pretty much given up at this point and am just going to yell at them to use client certifcates with HTTPS to provide authentication for this whole thing and just drop the ws-security.

suffix
Jul 27, 2013

Wheeee!
please use TLS

why would you willingly use a standard that requires xml normalization

Shaggar
Apr 26, 2006

Janitor Prime posted:

I don't have the option of using wcf since our whole stack is RedHat/Java. That's the same guide I used to verify my setup after I started searching around for answers, so I'm confident I've setup all the keystore stuff in cxf.

I really think the problem is in the WSDL but I can't for the life of me confirm if it's correct and the problem is on my side or if it's borked and I need to yell at the developer. In that guide if you notice the Complete Tutorial Binding Assertion has a section about sp:AsymmetricBinding which is missing in mine and cfx is bitching about it. I've tried adding it by hand but holy poo poo everything blew up after that. In desperation I tried to use Axis2 but LOL that library doesn't even know how to declare it's dependencies and I had to track down like 10 libs by hand.

I've pretty much given up at this point and am just going to yell at them to use client certifcates with HTTPS to provide authentication for this whole thing and just drop the ws-security.

yeah I think thats right. it probably needs to be wrapped in an assymetric policy assertion cause ur using your private key for signing. what are they using to generate the wsdl cause I would think if they set it up in cxf then cxf would generate the correct assertions

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
i think i might apply for some computer classes at the local community college

Share Bear
Apr 27, 2004

i check this thread to see if there are any other books to be recommended

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY
im readin this atm



its excellent but also v slow going because i am a terrible mathematician as well as a terrible programmer. two years out of school and ive forgotten a shameful amount

Share Bear
Apr 27, 2004

coffeetable posted:

im readin this atm



its excellent but also v slow going because i am a terrible mathematician as well as a terrible programmer. two years out of school and ive forgotten a shameful amount

the only mooc really worth a drat was the machine learning one on coursera, i highly recommend it

ChiralCondensate
Nov 13, 2007

what is that man doing to his colour palette?
Grimey Drawer
except not from Andrew "Smug as gently caress" Ng

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

coffeetable posted:

im readin this atm



its excellent but also v slow going because i am a terrible mathematician as well as a terrible programmer. two years out of school and ive forgotten a shameful amount

a good book

Share Bear posted:

the only mooc really worth a drat was the machine learning one on coursera, i highly recommend it

geoff hintons + prob graphical models are good too

thats about it

o udacity's graphics one is gr8

coffeetable
Feb 5, 2006

TELL ME AGAIN HOW GREAT BRITAIN WOULD BE IF IT WAS RULED BY THE MERCILESS JACKBOOT OF PRINCE CHARLES

YES I DO TALK TO PLANTS ACTUALLY

Share Bear posted:

the only mooc really worth a drat was the machine learning one on coursera, i highly recommend it
i did consider that, but it seemed light on the theory side. looking at it again now, the biggest example is that ng's got multivariate gaussians as an optional in week 9 of a 10 week course, while Murphy's book treats them as foundational material

e: it's totally understandable from an accessibility standpoint, but not what i was wanting

fritz
Jul 26, 2003

Share Bear posted:

the only mooc really worth a drat was the machine learning one on coursera, i highly recommend it

there was one on i think volcanoes that was pretty good and some astronomy ones that were worth watching

Janitor Prime
Jan 22, 2004

PC LOAD LETTER

What da fuck does that mean

Fun Shoe

fritz posted:

there was one on i think volcanoes that was pretty good and some astronomy ones that were worth watching

The security one by Dan Boneh was pretty good too

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Share Bear posted:

the only mooc really worth a drat

no more racism in yospos

Luigi Thirty
Apr 30, 2006

Emergency confection port.

asp.net, MVC. so in the eve online data set I have a class InvTypes that i'm looking up objects of. there are objects containing data associated with a particular InvTypes object in another table, DgmTypeAttributes, with a many-to-one relation of TypeAttributes to InvTypes. InvTypes does not reference DgmTypeAttributes. so to show the complete data associated with an InvTypes object, I need to also display DgmTypeAttributes data in my view. if I'm officially going by InvTypes in my controller, what's the correct way to send both models' data to the view? there are a couple of ways i've found (encapsulation or sticking it in viewdata) but i'm not sure which is canon.

Bloody
Mar 3, 2013

make a viewmodel and put your poo poo in there and send it to the view

Squinty Applebottom
Jan 1, 2013

if theres foreign keys can't you do invtype.DgmTypeAttributes

if you can't then you need to fix asp.net mvc or your db

Luigi Thirty
Apr 30, 2006

Emergency confection port.

Bloody posted:

make a viewmodel and put your poo poo in there and send it to the view

of course



now i have to fix it truncating the names :argh:

Squinty Applebottom posted:

if theres foreign keys can't you do invtype.DgmTypeAttributes

if you can't then you need to fix asp.net mvc or your db

other way round, it's one-to-many. i can look up an invtype from dgmtypeattributes.

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band
this feels weird and wrong to me:

code:
if (true != some_booleantype_value)
is this just something wrong with my brain?

GameCube
Nov 21, 2006

prefect posted:

this feels weird and wrong to me:

code:
if (true != some_booleantype_value)
is this just something wrong with my brain?

it's just what you're used to seeing, that's preferable because once you get in the habit you'll avoid accidentally using = instead of == because you can't assign to true/false

unless you're saying it should be

code:
if (!some_boolean_shit)
because yeah that's better

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Werthog 95 posted:

unless you're saying it should be

code:
if (!some_boolean_shit)

that's exactly what i would expect it to be

gonadic io
Feb 16, 2011

>>=

prefect posted:

that's exactly what i would expect it to be

if you're in a poo poo language sometimes you can use true != x to coerce a value to a bool

FamDav
Mar 29, 2008

AlsoD posted:

if you're in a poo poo language sometimes you can use true != x to coerce a value to a bool

lol if you dont sprinkle !! liberally

GameCube
Nov 21, 2006

prefect posted:

that's exactly what i would expect it to be

i think it's some kind of cargo cult thing where people who've just started reading about coding conventions get it into their head that "more verbosity == better than"

i know i went through that phase

Workaday Wizard
Oct 23, 2009

by Pragmatica
hullo

whats the best practicest place to put your mybatis config? also how do you deal with development vs. deployment configs?

i am using maven and i dont know jack about anything

prefect
Sep 11, 2001

No one, Woodhouse.
No one.




Dead Man’s Band

Shinku ABOOKEN posted:

hullo

whats the best practicest place to put your mybatis config? also how do you deal with development vs. deployment configs?

i am using maven and i dont know jack about anything

i think (think) you might want maven's build profiles: http://maven.apache.org/guides/introduction/introduction-to-profiles.html

but i'm not very familiar with them, so that might be a bad idea

Shaggar
Apr 26, 2006

Shinku ABOOKEN posted:

hullo

whats the best practicest place to put your mybatis config? also how do you deal with development vs. deployment configs?

i am using maven and i dont know jack about anything

there are a couple ways to do it, but i generally create a resource entry in maven that points at a folder with an environmental variable name.
XML code:
<resource>
	<directory>environments/${environment}</directory>
	<filtering>true</filtering>
</resource>
and in profiles
XML code:
<profile>
	<id>Development</id>
	<activation>
		<activeByDefault>false</activeByDefault>
	</activation>
	<properties>
		<environment>Development</environment>
		<somecustomproperty>wahtever</somecustomproperty>
	</properties>
</profile>
in your root folder you'd have an environments folder and under that you'd have a folder for each environment in your maven config. then when you build, you pick the environment you want and it uses any resources in that environment's folder. so you put like a database.properties in each one that contains variables like hostname, username, password, etc...

then in your spring config you have something like this

XML code:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
	<property name="locations" value="classpath:/database.properties"/>
</bean>
<bean id="dataSource" destroy-method="close"  class="${db.dataSourceClassName}">
	<property name="driverClassName" value="${db.driverClassName}" />
	<property name="url" value="${db.url}" />
	<property name="username" value="${db.username}" />
	<property name="password" value="${db.password}" />
</bean>
where each of the ${} variables is loaded from database.properties. and the database.properties you have on your classpath was decided based on which environment you built it with.

also, I like to put my mybatis stuff in its own separate maven project w/ mappers + configs and then load those configs in the consuming package like
XML code:
<import resource="classpath:/mybatis-buttmappings.xml"/>
this makes mybatis a runtime dependency of the deployment package instead of compile time.

Workaday Wizard
Oct 23, 2009

by Pragmatica

Shaggar posted:

[good stuff]

neat. thanks shaggar!

Shaggar
Apr 26, 2006
some people will get mad about doing profiles by environment cause they don't think they should be used that way, but the only other way to do it would be to store the configuration in the destination server which means ops people which means it will be hosed up.

BONGHITZ
Jan 1, 1970

how small of an increase would i get if i made variables global and didn't use any parameters in my functions

BONGHITZ
Jan 1, 1970

an increase in SPEED

bobbilljim
May 29, 2013

this christmas feels like the very first christmas to me
:shittydog::shittydog::shittydog:
depends, but effectively nothing

FamDav
Mar 29, 2008
itll probably gently caress with locality since the code youre executing wont be near the data it is executing on

but yeah no one will ever notice op

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

FamDav posted:

lol if you dont sprinkle !! liberally

we found a triple bang the other day. spent a long time making fun of it until a guy checked the history and realized it was him

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison

MALE SHOEGAZE posted:

we found a triple bang the other day. spent a long time making fun of it until a guy checked the history and realized it was him

gave ur mum the old triple bang the other night iykwim

Malcolm XML
Aug 8, 2009

I always knew it would end like this.

FamDav posted:

itll probably gently caress with locality since the code youre executing wont be near the data it is executing on

but yeah no one will ever notice op

icache and dcache are separate though????

Adbot
ADBOT LOVES YOU

Soricidus
Oct 21, 2010
freedom-hating statist shill

BONGHITZ posted:

how small of an increase would i get if i made variables global and didn't use any parameters in my functions
quite possibly negative, since e.g. the compiler might no longer be able to assume that the value of one of the current function's parameters was still the same after calling another function.

  • Locked thread